/**
 * Emergency navbar fix - inline in header if needed
 */

/* Force mobile menu at smaller desktop sizes */
@media (max-width: 1150px) {
    /* Show the hamburger menu */
    #sp-header #offcanvas-toggler {
        display: flex !important;
    }
    
    /* Hide desktop menu */
    #sp-header .sp-megamenu-wrapper {
        display: none !important;
    }
    
    /* Hide search in header modules */
    #sp-header .header-modules .search {
        display: none !important;
    }
}

/* Ensure offcanvas toggler is visible even for .mega menu type */
@media (max-width: 1150px) {
    #sp-header #offcanvas-toggler.mega,
    #sp-header #offcanvas-toggler.offcanvas {
        display: flex !important;
    }
}

/* Ensure profile stays on one line */
.sp-profile-wrapper .sp-sign-in {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
}

/* Fix logo aspect ratio - ensure proportional scaling */
#sp-logo img,
.logo img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Ensure logo container maintains aspect ratio */
#sp-logo {
    display: flex;
    align-items: center;
}

#sp-logo .logo {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Media query for proportional logo scaling */
@media (min-width: 992px) and (max-width: 1399px) {
    #sp-logo .logo {
        height: 60px; /* Smaller height for medium screens */
    }
    
    #sp-logo .logo img {
        max-height: 50px;
    }
}

/* For debugging - uncomment to see boundaries */
/*
#sp-header { outline: 2px solid red; }
#sp-menu { outline: 2px solid blue; }
.header-modules { outline: 2px solid green; }
.sp-profile-wrapper { outline: 2px solid orange; }
*/