/* New Mobile Layout for Business Limousine */

/* Prevent horizontal scroll globally */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

* {
    max-width: 100vw !important;
}

/* NEW MOBILE LAYOUT */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* Reset header top for new layout */
    .header-top {
        background: #05477b;
        padding: 8px 0;
    }
    
    .header-top .container {
        display: block !important;
        padding: 0 10px;
    }
    
    /* NEW: Phone numbers on single line with names */
    .phone-numbers {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 5px !important;
        margin-bottom: 8px;
        overflow: hidden;
    }
    
    .phone-item {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 3px 2px !important;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .phone-icon {
        display: none !important;
    }
    
    .phone-info {
        gap: 1px !important;
    }
    
    .phone-name {
        font-size: 9px !important;
        font-weight: 500 !important;
        display: block !important;
        line-height: 1.1;
    }
    
    .phone-number {
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1.1;
    }
    
    .phone-status {
        font-size: 7px !important;
        padding: 1px 3px !important;
        border-radius: 3px;
        margin-top: 1px;
        display: inline-block;
    }
    
    .phone-name-row {
        flex-direction: column !important;
        gap: 1px !important;
        align-items: center !important;
    }
    
    /* NEW: Language selector and hamburger on same row */
    .mobile-controls-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 5px;
    }
    
    /* Language dropdown - compact */
    .language-dropdown.mobile-only {
        display: block !important;
    }
    
    .language-dropdown-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        padding: 6px 8px;
        display: flex;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        color: white;
        font-size: 14px;
        min-height: 32px;
    }
    
    .current-flag {
        font-size: 16px;
    }
    
    .dropdown-arrow {
        font-size: 10px;
        transition: transform 0.3s ease;
    }
    
    .language-dropdown-btn.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .language-dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 3px;
        background: white;
        border-radius: 6px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        min-width: 160px;
        max-height: 250px;
        overflow-y: auto;
        display: none;
        z-index: 1001;
    }
    
    .language-dropdown-menu.active {
        display: block;
    }
    
    .language-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        text-decoration: none;
        color: #2d3748;
        transition: background 0.2s ease;
        font-size: 14px;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .language-option:last-child {
        border-bottom: none;
    }
    
    .language-option:hover,
    .language-option.active {
        background: #f7fafc;
    }
    
    .option-flag {
        font-size: 16px;
    }
    
    .option-name {
        flex: 1;
        font-size: 13px;
    }
    
    /* Hamburger menu - compact */
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        position: relative;
        z-index: 1001;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        margin: 4px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Main header - simplified */
    .header-main {
        padding: 8px 0;
    }
    
    .header-main .container {
        justify-content: center !important;
        padding: 0 10px;
    }
    
    .logo-section {
        text-align: center;
    }
    
    .logo-image-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0;
    }
    
    .logo-icon {
        width: 120px !important;
        height: 68px !important;
    }
    
    /* Hide desktop navigation */
    .nav-links,
    .nav-cta {
        display: none !important;
    }
    
    /* Mobile menu styling */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .mobile-menu-header {
        padding: 15px;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: #666;
        padding: 5px;
    }
    
    .mobile-nav-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-nav-links li {
        border-bottom: 1px solid #e2e8f0;
    }
    
    .mobile-nav-links a {
        display: block;
        padding: 15px;
        text-decoration: none;
        color: #2d3748;
        font-weight: 500;
        font-size: 16px;
    }
    
    .mobile-nav-links a:active {
        background: #f7fafc;
    }
    
    .mobile-nav-cta {
        display: block;
        margin: 15px;
        background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
        color: white !important;
        padding: 12px 20px;
        border-radius: 20px;
        text-decoration: none;
        font-weight: 600;
        text-align: center;
        font-size: 15px;
    }
    
    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-backdrop.active {
        display: block;
        opacity: 1;
    }
    
    /* NEW: Bottom action buttons */
    .mobile-bottom-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: transparent;
        z-index: 998;
        pointer-events: none;
    }
    
    .mobile-bottom-actions > * {
        pointer-events: auto;
    }
    
    /* Book Now button - bottom left */
    .mobile-booking-btn {
        background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 25px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 3px 15px rgba(26, 54, 93, 0.4);
        transition: all 0.3s ease;
        max-width: 140px;
        white-space: nowrap;
        display: block !important;
    }
    
    .mobile-booking-btn:active {
        transform: translateY(1px);
    }
    
    /* Chat bubble - bottom right */
    .chat-bubble-mobile {
        width: 50px;
        height: 50px;
        background: #25D366;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 3px 15px rgba(37, 211, 102, 0.4);
        cursor: pointer;
        transition: all 0.3s ease;
        color: white;
        font-size: 24px;
        text-decoration: none;
    }
    
    .chat-bubble-mobile:active {
        transform: scale(0.95);
    }
    
    /* Hide any existing mobile action bars */
    .mobile-action {
        display: none !important;
    }
    
    /* Ensure proper container padding */
    .container {
        padding: 0 10px !important;
        max-width: 100% !important;
    }
    
    /* Booking popup adjustments */
    .booking-popup {
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
    }
    
    .booking-popup-overlay.active {
        padding: 0 !important;
    }
    
    .popup-form-row {
        grid-template-columns: 1fr !important;
    }
}

/* Small devices - even more compact */
@media (max-width: 480px) {
    .phone-item {
        font-size: 10px !important;
    }
    
    .phone-name {
        font-size: 8px !important;
    }
    
    .phone-number {
        font-size: 10px !important;
    }
    
    .phone-status {
        font-size: 6px !important;
    }
    
    .logo-icon {
        width: 100px !important;
        height: 57px !important;
    }
    
    .mobile-booking-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
        max-width: 120px !important;
    }
    
    .chat-bubble-mobile {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .phone-numbers {
        gap: 2px !important;
    }
    
    .phone-item {
        font-size: 9px !important;
        padding: 2px 1px !important;
    }
    
    .phone-name {
        font-size: 7px !important;
    }
    
    .phone-number {
        font-size: 9px !important;
    }
    
    .mobile-booking-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        max-width: 100px !important;
    }
    
    .container {
        padding: 0 5px !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    .mobile-menu {
        padding-bottom: env(safe-area-inset-bottom);
    }
}