/* Calendar Booking Styles */

.calendar-section {
    margin-bottom: 24px;
}

.calendar-section h3 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Date picker input */
[data-calendar-date] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

[data-calendar-date]:focus {
    outline: none;
    border-color: #006BA0;
}

/* Selected date display */
.selected-date-display {
    margin: 24px 0 16px 0;
}

.selected-date-display label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-wave-blue);
    font-weight: 600;
}

.selected-date-display .selected-date {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

/* Time slots container */
.time-slots-container {
    margin-top: 24px;
}

/* Time filter buttons */
.time-filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-time-filter {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-time-filter:hover {
    border-color: #009891;
    color: #009891;
    background: #f0fffe;
}

.btn-time-filter.active {
    border-color: #009891;
    background: #009891;
    color: white;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    /* Reduced from 120px */
    gap: 8px;
    margin-top: 12px;
}

/* Time slot buttons */
.time-slot {
    padding: 8px;
    /* Reduced from 12px */
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: #FAF7F2;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* Reduced from 4px */
}

.time-slot .time {
    font-size: 14px;
    /* Reduced from 16px */
    font-weight: 600;
}

.time-slot .status {
    font-size: 11px;
    /* Reduced from 12px */
    font-weight: 400;
    opacity: 0.8;
}

.time-slot:hover:not(.unavailable) {
    border-color: #009891;
    transform: scale(1.02);
}

.time-slot.available {
    border-color: #009891;
    color: #009891;
}

.time-slot.available:hover {
    background: #009891;
    color: white;
}

.time-slot.unavailable {
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.time-slot.selected {
    background: #006BA0;
    border-color: #006BA0;
    color: white;
    transform: scale(1.05);
}

.time-slot.overlapping {
    background: rgba(0, 107, 160, 0.2);
    border-color: #006BA0;
    color: #006BA0;
    border-style: dashed;
    cursor: not-allowed;
    pointer-events: none;
}

.time-slot.overlapping .time {
    opacity: 0.7;
}


/* No slots message */
.no-slots-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-slots-message p {
    margin: 8px 0;
}

.no-slots-message p:first-child {
    font-size: 18px;
    font-weight: 600;
}

/* Loading state */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #009891;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Error message */
.error-message {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin-top: 12px;
}

.error-message strong {
    display: block;
    margin-bottom: 4px;
}

.error-message p {
    margin: 0;
}

/* Flatpickr customization */
.flatpickr-calendar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.flatpickr-day.selected {
    background: #006BA0;
    border-color: #006BA0;
}

.flatpickr-day.selected:hover {
    background: #0B5D82;
    border-color: #0B5D82;
}

.flatpickr-day:hover {
    background: #BFE5E4;
    border-color: #009891;
}

/* Responsive design */
@media (max-width: 768px) {
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        /* Reduced from 100px */
        gap: 6px;
    }

    .time-slot {
        padding: 6px;
        /* Reduced from 10px */
    }

    .time-slot .time {
        font-size: 13px;
        /* Reduced from 14px */
    }

    .selected-date-display label {
        font-size: 18px;
    }

    .selected-date-display .selected-date {
        font-size: 14px;
    }
}

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