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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    margin: 20px auto;
    margin-top: 20px;
    padding: 0;
    border-radius: 15px;
    width: 70%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.4s ease-out;
    overflow: hidden;
    max-height: none;
}

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

.modal-content h3 {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 18px 20px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.close {
    position: absolute;
    top: 12px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

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

/* Form Styles */
#booking-form {
    padding: 20px 25px 10px;
}

#booking-form > div {
    margin-bottom: 15px;
}

/* Adults and Children in same row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#booking-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
}

#booking-form input[type="email"],
#booking-form input[type="number"],
#booking-form input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    border-radius: 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
}

#booking-form input[type="email"]:focus,
#booking-form input[type="number"]:focus,
#booking-form input[type="date"]:focus {
    outline: none;
    border-bottom-color: #3b82f6;
    background: transparent;
    box-shadow: none;
}

#booking-form input[type="number"] {
    -moz-appearance: textfield;
}

#booking-form input[type="number"]::-webkit-outer-spin-button,
#booking-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total Price Display */
#booking-form > div strong {
    display: block;
    padding: 12px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    color: #1e40af;
    font-size: 1rem;
}

#totalPrice {
    color: #1d4ed8;
    font-weight: 700;
}

/* Submit Button */
#booking-form button[type="submit"] {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

#booking-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

#booking-form button[type="submit"]:active {
    transform: translateY(0);
}

/* Response Message */
#response-message {
    margin-top: 15px;
    padding: 0 25px 20px;
    text-align: center;
}

#response-message p {
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    margin: 5px 0;
    font-size: 0.9rem;
}

#response-message p[style*="green"] {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #34d399;
}

#response-message p[style*="red"] {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #f87171;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .modal-content {
        width: 75%;
        max-width: 420px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 85%;
        max-width: 400px;
        margin: 12% auto;
    }

    .modal-content h3 {
        padding: 16px 18px;
        font-size: 1.2rem;
    }

    #booking-form {
        padding: 18px 20px 20px;
    }

    #booking-form > div {
        margin-bottom: 12px;
    }

    /* Stack Adults and Children on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #booking-form label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    #booking-form input[type="email"],
    #booking-form input[type="number"],
    #booking-form input[type="date"] {
        padding: 7px 9px;
        font-size: 0.85rem;
    }

    #booking-form > div strong {
        padding: 10px;
        font-size: 0.95rem;
    }

    #booking-form button[type="submit"] {
        padding: 9px;
        font-size: 0.9rem;
    }

    .close {
        top: 10px;
        right: 12px;
        font-size: 26px;
        width: 28px;
        height: 28px;
    }

    #response-message p {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        max-width: 350px;
        margin: 10% auto;
        border-radius: 12px;
    }

    .modal-content h3 {
        padding: 14px 15px;
        font-size: 1.1rem;
    }

    #booking-form {
        padding: 15px 18px 18px;
    }

    #booking-form > div {
        margin-bottom: 10px;
    }

    #booking-form label {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    #booking-form input[type="email"],
    #booking-form input[type="number"],
    #booking-form input[type="date"] {
        padding: 6px 8px;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    #booking-form > div strong {
        padding: 8px;
        font-size: 0.9rem;
    }

    #booking-form button[type="submit"] {
        padding: 8px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .close {
        top: 8px;
        right: 10px;
        font-size: 24px;
        width: 26px;
        height: 26px;
    }

    #response-message {
        margin-top: 12px;
    }

    #response-message p {
        padding: 7px;
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .modal-content {
        width: 95%;
        max-width: 320px;
    }

    .modal-content h3 {
        padding: 12px;
        font-size: 1rem;
    }

    #booking-form {
        padding: 12px 15px 15px;
    }

    #booking-form > div {
        margin-bottom: 8px;
    }

    #booking-form label {
        font-size: 0.7rem;
    }

    #booking-form input[type="email"],
    #booking-form input[type="number"],
    #booking-form input[type="date"] {
        padding: 5px 7px;
        font-size: 0.75rem;
    }

    #booking-form > div strong {
        padding: 7px;
        font-size: 0.85rem;
    }

    #booking-form button[type="submit"] {
        padding: 7px;
        font-size: 0.8rem;
    }
}

/* Loading State */
#booking-form.loading button[type="submit"] {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

#booking-form.loading button[type="submit"]::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Input Validation Styles */
#booking-form input:invalid:not(:placeholder-shown) {
    border-bottom-color: #ef4444;
}

#booking-form input:valid:not(:placeholder-shown) {
    border-bottom-color: #10b981;
}

/* Accessibility */
#booking-form input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth scrolling for modal content */
.modal-content {
    max-height: 85vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Ensure modal scrolls from top */
.modal {
    overflow-y: scroll;
    overflow-x: hidden;
}

.modal::-webkit-scrollbar {
    width: 10px;
}

.modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 5px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}