/* Calendar container */
.calendar-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.calendar-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.calendar-nav:hover {
    color: rgba(124, 58, 237, 0.9);
}

.calendar-nav:disabled {
    color: #666;
    cursor: not-allowed;
}

.current-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nav-btn:hover {
    background: rgba(124, 58, 237, 0.2);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.weekday {
    color: rgba(124, 58, 237, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f1f1f3;
    font-weight: 500;
}

.calendar-day.empty {
    background: none;
    border: none;
    pointer-events: none;
}

.calendar-day.available:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
}

.calendar-day.unavailable {
    background: rgba(128, 128, 128, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
    opacity: 0.5;
}

.calendar-day.past {
    opacity: 0.5;
    text-decoration: line-through;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(128, 128, 128, 0.1);
}

.calendar-day.today {
    border-color: rgba(124, 58, 237, 0.6);
    background: rgba(124, 58, 237, 0.1);
}

.calendar-day.selected {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(124, 58, 237, 0.55);
}

.calendar-day.fully-booked {
    background: rgba(128, 128, 128, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    position: relative;
}

.calendar-day.fully-booked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(-15deg);
}

.calendar-day.unavailable .day-number::after,
.calendar-day.past .day-number::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: calc(100% + 4px);
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(-15deg);
}

.today-marker {
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.85);
}

.day-number {
    font-size: 1rem;
    position: relative;
}

.fully-booked-marker {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

/* Time slots (grid used by booking flow) */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
}

.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    width: 100%;
}

.slots-header h3 {
    text-align: center;
    flex-grow: 1;
    margin: 0;
    padding: 0 1rem;
}

.slots-header .back-button {
    position: relative;
    left: 0;
    margin: 0;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.time-slot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f1f1f3;
    font-size: 0.9rem;
    padding: 0.72rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-slot:not(.booked):hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
}

.time-slot.selected {
    background: #7c3aed;
    border-color: #7c3aed;
}

.time-slot.booked {
    background: rgba(128, 128, 128, 0.2);
    border-color: rgba(128, 128, 128, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    text-decoration: line-through;
    overflow: hidden;
    opacity: 0.5;
}

.time-slot.booked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 2px;
    background: rgba(239, 68, 68, 0.3);
    transform: rotate(-15deg);
}

.booked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.no-slots-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Modal shell */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #13131a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: none;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f1f1f3;
    letter-spacing: -0.01em;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.close-modal:hover {
    color: #f1f1f3;
}

.book-button,
.book-nav-button {
    cursor: pointer;
    transition: background 0.15s ease;
}

.book-nav-button {
    background: rgba(124, 58, 237, 0.35);
    color: white;
    border: 1px solid rgba(124, 58, 237, 0.45);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.book-nav-button:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* Booking modal header (slot selection step) */
.booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.selected-date {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.schedule-info {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    text-align: center;
}

/* Summary + form */
.booking-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.booking-summary h3 {
    color: #f1f1f3;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.01em;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #f1f1f3;
}

.summary-item i {
    color: rgba(124, 58, 237, 0.8);
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-group input {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.85rem 0.85rem 0.85rem 2.5rem;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
    outline: none;
}

.form-group input:invalid {
    border-color: rgba(239, 68, 68, 0.5);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 2.35rem;
    color: rgba(124, 58, 237, 0.6);
    z-index: 1;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.phone-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.back-button {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.slots-header .back-button,
.booking-modal-header .back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.slots-header .back-button:hover,
.booking-modal-header .back-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-button i {
    font-size: 0.9rem;
}

.confirm-button {
    background: #7c3aed;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.confirm-button:hover {
    background: #6d28d9;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: #7c3aed;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.submit-button:hover {
    background: #6d28d9;
}

/* Search */
.search-container {
    margin-bottom: 2rem;
}

.booking-search {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.15s ease;
}

.booking-search:focus {
    border-color: rgba(124, 58, 237, 0.55);
    outline: none;
}

.booking-step {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #7c3aed;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toasts (entrance motion — not hover lift) */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    background: rgba(20, 20, 20, 0.95);
    color: white;
    transform: translateY(100px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #4caf50;
}

.toast-error {
    border-left: 4px solid #f44336;
}

.toast-warning {
    border-left: 4px solid #ff9800;
}

.toast-info {
    border-left: 4px solid #2196f3;
}

.booking-card {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 0.75rem;
        margin: 0 auto;
    }

    .calendar-container {
        padding: 0.25rem;
        margin: 0;
        width: 100%;
    }

    .calendar-grid {
        gap: 2px;
        margin: 0.5rem 0;
        width: 100%;
    }

    .calendar-day {
        padding: 0.35rem;
        font-size: 0.85rem;
        min-width: 0;
        aspect-ratio: 1;
    }

    .weekday {
        padding: 0.25rem 0;
        font-size: 0.75rem;
        min-width: 0;
    }

    .calendar-weekdays {
        gap: 2px;
    }

    .fully-booked-marker {
        font-size: 0.45rem;
        bottom: 1px;
    }

    .calendar-header {
        padding: 0.25rem;
    }

    .current-month {
        font-size: 1rem;
    }

    .slots-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .slots-header h3 {
        order: -1;
        width: 100%;
        text-align: left;
        padding: 0;
    }

    .slots-header .back-button {
        margin-left: 0;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
        padding: 0.5rem;
    }
}

@media (max-width: 360px) {
    .modal-content {
        width: 98%;
        padding: 0.5rem;
    }

    .calendar-container {
        padding: 0.2rem;
    }

    .calendar-grid {
        gap: 1px;
    }

    .calendar-day {
        padding: 0.3rem;
        font-size: 0.8rem;
    }

    .weekday {
        font-size: 0.7rem;
    }
}
