/**
 * PWA Desktop Header Fix
 * Prevents search bar from wrapping down the page
 * ONLY APPLIES TO DESKTOP - Mobile is untouched
 */

/* DESKTOP ONLY - Don't touch mobile! */
@media (min-width: 1024px) {
    /* Fix header layout to prevent wrapping */
    .header__inner {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: nowrap !important;
    }

    /* Make nav dropdown not break layout */
    .nav__dropdown {
        position: relative;
        white-space: nowrap;
    }

    /* Ensure nav items don't force wrapping */
    .nav {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        flex-shrink: 0;
    }

    /* Search bar should stay inline */
    .search-bar,
    .header__search {
        flex-shrink: 1;
        min-width: 200px;
        max-width: 300px;
    }

    /* Prevent dropdown from expanding header */
    .nav__dropdown-content {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 5px;
        z-index: 1000;
        white-space: normal;
    }
}

/* On smaller desktop screens, hide less important elements first */
@media (min-width: 1024px) and (max-width: 1400px) {
    .header__address {
        display: none !important;
    }
}

@media (min-width: 1024px) and (max-width: 1200px) {
    .search-bar,
    .header__search {
        max-width: 200px;
    }
}

/* Ensure header doesn't overflow - DESKTOP ONLY */
@media (min-width: 1024px) {
    .header {
        overflow: hidden; /* Hide both X and Y overflow */
    }

    .header .container {
        max-width: 100%;
        overflow: visible; /* Allow search dropdown to extend */
    }
    
    .header__inner {
        overflow: visible; /* Allow search dropdown to show */
    }
}

/* ========================================
   MOBILE PHONE BUTTON FIX
   Force transparent background on mobile/tablet
   ======================================== */
@media (max-width: 768px) {
    .header__phone {
        background: transparent !important;
        background-color: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
}

/* PWA-specific mobile phone fix - extra specificity */
@media (max-width: 768px) and (display-mode: standalone) {
    .header__phone,
    .header .header__phone,
    .header__cta .header__phone {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        color: #FF6B00 !important;
    }
    
    .header__phone svg {
        fill: #FF6B00 !important;
    }
    
    .header__phone span {
        color: #FF6B00 !important;
    }
}
