/* Booking Flow Responsive Fix - Makes UI usable on all devices */

/* Global viewport and font size adjustments */
html {
    font-size: 14px; /* Reduce base font size for better fit */
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
}

/* Container width constraints */
.container {
    max-width: 1000px; /* Reduced from 1200px */
    padding: 0 1rem; /* Reduced from 2rem */
}

/* Modal sizing fixes */
.modal-content {
    width: 95%; /* Increased from 90% */
    max-width: 450px; /* Reduced from 500px */
    padding: 1.5rem; /* Reduced from 2rem */
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 750px; /* Reduced from 900px */
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 1rem;
    }
    
    .modal {
        align-items: flex-start;
    }
}

/* Form element sizing */
.form-group {
    margin-bottom: 1rem; /* Reduced spacing */
}

.form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem; /* Reduced from 0.5rem */
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem; /* Reduced from 0.75rem */
    font-size: 0.875rem; /* Reduced from 1rem */
}

/* Booking progress indicator */
.booking-progress {
    padding: 1rem 0; /* Reduced from 1.5rem */
    margin-bottom: 1rem; /* Reduced from 2rem */
    overflow-x: auto;
    white-space: nowrap;
}

.progress-step {
    transform: scale(0.85); /* Shrink progress indicators */
}

@media (max-width: 480px) {
    .booking-progress {
        display: none; /* Hide on very small screens */
    }
}

/* Step content */
.step-content {
    max-width: 100%; /* Changed from 800px */
    padding: 0 0.5rem;
}

.booking-content {
    min-height: auto; /* Changed from 400px */
}

/* Button sizing */
.btn {
    padding: 0.5rem 1rem; /* Reduced padding */
    font-size: 0.875rem;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Hero section adjustments */
.hero {
    min-height: 50vh; /* Reduced from default */
}

.hero-content h2 {
    font-size: 2rem; /* Reduced size */
}

@media (max-width: 768px) {
    .hero {
        min-height: 40vh;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
}

/* Search form adjustments */
.search-card {
    padding: 1.5rem; /* Reduced padding */
}

.search-grid {
    gap: 0.75rem; /* Reduced gap */
}

/* Room cards */
.room-card {
    flex-direction: column; /* Stack vertically on small screens */
}

@media (min-width: 768px) {
    .room-card {
        flex-direction: row;
    }
}

/* Header adjustments */
.guest-header {
    padding: 0.5rem 0;
}

.nav-wrapper {
    padding: 0.5rem 0; /* Reduced from 1rem */
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide desktop nav on mobile */
    }
    
    .auth-buttons {
        gap: 0.5rem;
    }
    
    .auth-buttons .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Typography scale down */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    h4 { font-size: 1rem; }
}

/* Compact amenities grid */
.amenities-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.amenity-card {
    padding: 1rem;
}

/* Fix overflow issues */
body {
    overflow-x: hidden;
}

.modal-content,
.step-content,
.booking-content {
    overflow-x: hidden;
}

/* Mobile-first booking form */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* Ensure content fits viewport */
.modal-content {
    display: flex;
    flex-direction: column;
}

.booking-step {
    flex: 1;
    overflow-y: auto;
}

/* Fix date inputs on mobile */
input[type="date"] {
    min-height: 2.5rem; /* Ensure touch-friendly size */
}

/* Compact booking summary */
.booking-summary {
    padding: 1rem;
    font-size: 0.875rem;
}

/* Fix z-index issues */
.modal {
    z-index: 9999;
}

/* Ensure readable contrast */
.form-group label {
    color: var(--text-primary);
    font-weight: 500;
}