/* Booking Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    position: relative;
    max-height: 90vh;
    /* Ensure modal fits within viewport */
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 15px 15px 0 0;
    position: relative;
    flex-shrink: 0;
    /* Header stays fixed */
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    /* Allow scrolling within the body */
    flex-grow: 1;
    /* Take remaining space */
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

.submit-booking-btn {
    background: linear-gradient(135deg, var(--accent-pink), #d81b60);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.submit-booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(194, 24, 91, 0.3);
}

.submit-booking-btn:active {
    transform: translateY(0);
}

.form-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: -0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 778px) {
    .modal.active {
        display: block;
        /* Remove flex centering */
        padding: 2rem 1rem;
        /* Top padding ensures content starts below top edge */
        overflow-y: auto;
        /* Allow container scrolling */
    }

    .modal-content {
        display: flex;
        /* Internal flex layout */
        flex-direction: column;
        width: 95%;
        margin: 0 auto;
        /* Horizontally center */
        max-height: 85vh;
        /* Limit height for internal scrolling */
        /* Ensure bottom margin exists */
        margin-bottom: 2rem;
    }

    .modal-header {
        padding: 1.2rem 1.5rem;
        flex-shrink: 0;
    }

    .modal-header h2 {
        font-size: 1.5rem;
        padding-right: 2rem;
    }

    .modal-body {
        padding: 1.5rem;
        overflow-y: auto;
        /* Enable scrolling inside form */
        flex-grow: 1;
    }

    .close-modal {
        right: 1rem;
        top: 1rem;
    }
}