/* Booking Modal Styles */
.booking-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.booking-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.booking-modal.active .modal-overlay {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 600px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.booking-modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.4);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 16px;
    text-align: center;
}

.booking-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

/* Calendar Section */
.calendar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}

.calendar-section.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    gap: 0;
    pointer-events: none;
}

/* Date/Time Summary Bar */
.datetime-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(220, 20, 60, 0.12);
    border: 1px solid rgba(220, 20, 60, 0.35);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    max-height: 60px;
    overflow: hidden;
    opacity: 1;
}

.datetime-summary:hover {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.5);
}

.datetime-summary.collapsed {
    max-height: 0;
    padding: 0 14px;
    margin: 0;
    border-color: transparent;
    opacity: 0;
    pointer-events: none;
}

.datetime-summary-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.datetime-summary-change {
    font-size: 0.75rem;
    color: rgba(220, 20, 60, 0.8);
    font-weight: 600;
    transition: transform 0.3s ease;
}

.datetime-summary.expanded .datetime-summary-change {
    transform: rotate(180deg);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-month {
    font-size: 1rem;
    color: white;
    text-align: center;
    flex: 1;
}

.calendar-nav {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-nav:hover {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.4);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.calendar-day.header {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 0.65rem;
    cursor: default;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.today {
    border-color: rgba(220, 20, 60, 0.5);
}

.calendar-day:not(.disabled):not(.header):hover {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.4);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.6);
    color: white;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.time-slot {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.time-slot:hover {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.4);
    color: white;
}

.time-slot.selected {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.6);
    color: white;
}

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

/* Form Section */
.form-section {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 20, 60, 0.5);
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.selected-datetime {
    padding: 10px;
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 6px;
    color: white;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.85rem;
}

.selected-datetime strong {
    color: rgba(220, 20, 60, 0.9);
}

.submit-button {
    width: 100%;
    padding: 12px;
    background: rgba(220, 20, 60, 0.2);
    border: 1px solid rgba(220, 20, 60, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.6);
    transform: translateY(-2px);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px 16px;
        max-height: 90vh;
        max-width: 95%;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        font-size: 0.7rem;
    }
}

/* Scrollbar styling for modal content */
.modal-content::-webkit-scrollbar,
.time-slots::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track,
.time-slots::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb,
.time-slots::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.4);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.time-slots::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.6);
}
