/* Calendar Widget Styles */

.calendar-widget {
    margin-top: 1rem;
    padding: 0;
}

.calendar-instruction {
    margin: 0 0 0.75rem 0;
    font-weight: 500;
    color: white;
}

/* Make calendar message wider */
.calendar-message {
    max-width: 95% !important;
}

/* Flatpickr inline calendar input (hidden) */
.calendar-input {
    display: none;
}

/* Flatpickr inline calendar styling - glassmorphism theme */
.flatpickr-calendar.inline {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    background: rgba(0, 102, 204, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Month header */
.flatpickr-months {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.flatpickr-current-month {
    color: white;
    font-weight: 600;
}

.flatpickr-month {
    color: white;
}

/* Navigation arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
    fill: white !important;
    color: white !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    fill: rgba(255, 255, 255, 0.7) !important;
}

/* Weekday headers */
.flatpickr-weekdays {
    background: transparent;
}

.flatpickr-weekday {
    color: white;
    font-weight: 600;
}

span.flatpickr-weekday {
    color: white;
}

/* Days container */
.flatpickr-days {
    background: transparent;
}

/* Individual day cells */
.flatpickr-day {
    color: white;
    border: none;
    background: transparent;
    border-radius: 50%;
}

.flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

/* Today's date - circle outline only */
.flatpickr-day.today {
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
}

.flatpickr-day.today:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Selected date - solid blue with glow */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: rgba(0, 102, 204, 0.7);
    border: 2px solid rgba(0, 153, 255, 1);
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.8),
                0 0 20px rgba(0, 153, 255, 0.4);
    color: white;
    font-weight: 700;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: rgba(0, 102, 204, 0.85);
    border-color: rgba(0, 153, 255, 1);
    box-shadow: 0 0 15px rgba(0, 153, 255, 1),
                0 0 25px rgba(0, 153, 255, 0.6);
}

/* Disabled dates */
.flatpickr-day.flatpickr-disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Other month dates */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(255, 255, 255, 0.4);
}

.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Time slots container */
.time-slots-container {
    margin-top: 1rem;
}

.time-slots-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.no-slots {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

.calendar-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.calendar-time-slot {
    padding: 10px 16px;
    background: rgba(0, 102, 204, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.calendar-time-slot:hover:not(:disabled) {
    background: rgba(0, 102, 204, 0.6);
    border-color: rgba(0, 153, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                0 0 10px rgba(0, 153, 255, 0.5);
}

.calendar-time-slot:active:not(:disabled) {
    transform: translateY(0);
}

.calendar-time-slot:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-time-slot.booking {
    background: rgba(255, 193, 7, 0.4);
    border-color: rgba(255, 193, 7, 0.8);
    cursor: wait;
}

.calendar-time-slot.booked {
    background: rgba(34, 197, 94, 0.4);
    border-color: rgba(34, 197, 94, 0.8);
    cursor: default;
}

.calendar-time-slot.error {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.8);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .flatpickr-calendar.inline {
        max-width: 100%;
    }
    
    .calendar-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
    
    .calendar-time-slot {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .calendar-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}
