﻿:root {
    --menu-width: 340px;
    --header-height: 110px; /* fallback, updated by JS on load/resize */
}

/* ====== Menu container & layout ====== */
.menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--menu-width);
    height: 100vh;
    background: #fff;
    color: #222;
    padding: 28px 12px 10px 12px; /* leave top-padding so close button doesn't overlap */
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    z-index: 9999;
    transform: translateX(-110%);
    transition: transform .28s ease;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    /*overflow: visible;*/ /* allow close button overlap */
    overflow: hidden;
}

    /* open/sticky state */
    .menu-container.open,
    .menu-container.sticky {
        transform: translateX(0);
    }

/* single scrollable area */
.menu {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: block;
    padding-top: 8px;
    box-sizing: border-box;
    height: calc(100% - 56px); /* account for container padding and header/search area */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;
}

    /* WebKit (Chrome/Edge/Safari) scrollbar styling — appears only when needed */
    .menu::-webkit-scrollbar {
        width: 8px;
    }

    .menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .menu::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.12);
        border-radius: 6px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }

        .menu::-webkit-scrollbar-thumb:hover {
            background: rgba(0,0,0,0.18);
        }

    .menu, .menu * {
        box-sizing: border-box;
    }

/* ====== Search box ====== */
.search-box {
    margin: 6px 0 10px;
    position: relative;
}

    .search-box input {
        width: 100%;
        padding: 8px 56px 8px 10px; /* room for close/pin buttons */
        border-radius: 6px;
        border: 1px solid #ddd;
        background: #fff;
        color: #666;
        font-size: 13px;
        box-sizing: border-box;
    }

/* ====== Menu list / anchors ====== */
.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ececec;
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
}

    .menu-list > li {
        border-bottom: 1px solid #f3f3f3;
        background: #fff;
    }

    .menu-list a {
        position: relative;
        display: block;
        padding: 12px 14px 12px 30px;
        color: #222;
        text-decoration: none;
        font-size: 14px;
        background: transparent;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }

/* arrow indicator */
.arrow {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    color: #444;
    font-size: 12px;
    transition: transform .18s ease;
    margin: 0;
}

    .arrow.rotate {
        transform: translateY(-50%) rotate(90deg);
    }

/* hover / active */
.menu-list a:hover,
.menu-list a:focus {
    background: linear-gradient(90deg,#fff6f0,#ffffff);
    color: #0b0b0b;
    box-shadow: inset 4px 0 0 0 #ff5a2d;
    transform: translateX(2px);
    text-decoration: none;
}

.menu-list li.is-active > a {
    background: #fff0e6;
    color: #0b0b0b;
    font-weight: 600;
    box-shadow: inset 4px 0 0 0 #ff5a2d;
}

/* last-click marker */
.menu-list li.last-clicked > a {
    background: linear-gradient(90deg,#fff8f2,#fff2ea);
    color: #0b0b0b;
    font-weight: 700;
    box-shadow: inset 6px 0 0 0 #ff5a2d;
    border-left: 4px solid #ff5a2d;
}

/* ====== Submenus ====== */
.submenu, .submenus, .child-submenu {
    display: none;
    background: #fff;
}

    .submenu.is-active, .submenus.is-active, .child-submenu.is-active {
        display: block !important;
    }

    .submenu a, .submenus a, .child-submenu a {
        display: block;
        padding: 10px 36px 10px 30px;
        color: #444;
        border-bottom: 1px solid #f6f6f6;
        font-size: 13px;
        white-space: normal;
        text-align: left;
    }

    .child-submenu a {
        padding-left: 44px;
    }

    .submenus a {
        padding: 10px 36px 10px 20px;
    }

    .submenu.is-active {
        border-left: 3px solid #f2f2f2;
    }

/* ====== Search dropdown results ====== */
.search-dropdown {
    position: absolute;
    top: 75px;
    left: 10px;
    width: calc(100% - 20px);
    background: #fff;
    border: 1px solid #e9e9e9;
    z-index: 10002;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

    .search-dropdown a {
        color: #333;
        padding: 8px 10px;
        display: block;
    }

        .search-dropdown a:hover {
            background: #fafafa;
        }

        .search-dropdown a.focused {
            background: #f0f4f8;
            color: #0b0b0b;
            outline: none;
        }

/* ====== Buttons ====== */
.menu-burger {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10001;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff5a2d;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border: none;
    cursor: pointer;
}

.menu-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff5a2d;
    color: #fff;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    z-index: 10010;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity .16s ease, transform .16s ease;
    visibility: hidden;
}

    .menu-close.visible {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .menu-close:hover,
    .menu-close:focus {
        background: #ff6f47;
        outline: none;
    }

    .menu-close:focus {
        box-shadow: 0 0 0 3px rgba(255,90,45,0.18);
    }

.menu-pin {
    position: absolute;
    top: 8px;
    right: 40px; /* sits left of close button */
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #ff5a2d;
    font-size: 16px;
    border-radius: 4px;
}

    .menu-pin[aria-pressed="true"] {
        background: rgba(255,90,45,0.06);
        box-shadow: inset 3px 0 0 0 #ff5a2d;
    }

/* ====== Body shift when menu open/pinned ====== */
body.with-menu .hero,
body.with-menu .main-content > .column {
    margin-left: var(--menu-width);
    transition: margin-left .28s ease;
}

/* On small screens do not shift main content */
@media (max-width: 768px) {
    .menu-container {
        width: calc(100% - 16px);
        left: 8px;
        transform: translateY(-110%);
        top: 8px;
        border-radius: 6px;
    }

        .menu-container.open {
            transform: translateY(0);
        }

    body.with-menu .main-content > .column {
        margin-left: 0;
    }

    body.menu-sticky .welcome-notification {
        left: 0;
        width: 100%;
        padding-left: 5px;
    }

    body.menu-sticky .hero {
        margin-left: 0;
    }

        body.menu-sticky .hero .hero-body,
        body.menu-sticky .hero .navbar {
            max-width: none;
        }

    body.with-menu .hero,
    body.with-menu .main-content > .column {
        margin-left: 0;
    }

    .welcome-notification .columns {
        flex-direction: column !important;
        gap: 6px !important;
    }

    /* On small screens hide the top-right navbar when menu is open */
    body.with-menu .navbar .navbar-menu,
    body.with-menu .navbar .navbar-end {
        display: none !important;
    }
}

/* ====== Sticky/pinned menu layout adjustments ====== */
body.menu-sticky .menu-burger {
    display: none !important;
}

/* Adjust pinned navbar layout without moving the brand (logo) */
body.menu-sticky .navbar {
    position: relative !important;
    z-index: 10005 !important; /* above pinned menu */
    padding-left: 0 !important; /* do not push the brand to the right */
    padding-right: 12px !important;
    box-sizing: border-box !important;
    transition: padding-left .28s ease !important;
    display: flex !important;
    align-items: center !important;
}

    /* Ensure the brand (logo) stays left and above the pinned menu */
    body.menu-sticky .navbar .navbar-brand {
        margin-right: auto !important;
        position: relative !important;
        left: 0 !important;
        z-index: 10006 !important;
    }

    /* Move only the right-side navbar menu to the inset area */
    body.menu-sticky .navbar .navbar-menu {
        margin-left: calc(var(--menu-width) + 12px) !important;
        position: relative !important;
    }

/* ====== Welcome notification (consolidated) ====== */
.welcome-notification {
    height: 35px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

    .welcome-notification .welcome-inner {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }

    .welcome-notification .columns {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .welcome-notification .welcome-left {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: left !important;
        padding-right: 12px !important;
    }

    .welcome-notification .welcome-meta {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .welcome-notification .welcome-center,
    .welcome-notification .welcome-right {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        text-align: left !important;
    }

    /* When pinned, keep the welcome-left text flush left and inset only the right-side meta */
    body.menu-sticky .welcome-notification .welcome-inner {
        padding-left: 0 !important; /* don't push the main welcome text right */
        padding-right: 12px !important;
    }

    /* inset the right side meta to align with the navbar menu when pinned */
    body.menu-sticky .welcome-notification .welcome-meta {
        margin-left: calc(var(--menu-width) + 12px) !important;
    }

    /* ====== Fix: keep header + welcome aligned when menu is pinned/open ====== */

    /* Keep header, welcome and content aligned when menu is open or pinned */
    body.with-menu .hero .hero-body,
    body.menu-sticky .hero .hero-body,
    body.with-menu .welcome-notification .welcome-inner,
    body.menu-sticky .welcome-notification .welcome-inner,
    body.with-menu .main-content,
    body.menu-sticky .main-content {
        margin-left: var(--menu-width) !important;
        max-width: calc(100% - var(--menu-width)) !important;
        box-sizing: border-box !important;
    }

    /* Prevent welcome text wrapping and keep it truncated if it overflows */
    body.with-menu .welcome-notification .welcome-inner,
    body.menu-sticky .welcome-notification .welcome-inner {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Ensure header displays above the menu when pinned */
    body.menu-sticky .hero {
        position: relative !important;
        z-index: 10005 !important;
    }

    /* The burger should be visible when menu is closed; hide when pinned/open */
    .menu-burger {
        display: block;
    }

    body.menu-sticky .menu-burger,
    body.with-menu .menu-burger {
        display: none !important;
    }

    /* ====== Breadcrumb (moved from inline block) ====== */
    .breadcrumb-wrapper {
        padding: 6px 12px;
        font-size: 13px;
        color: #444;
    }

    .breadcrumb {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 8px;
        align-items: center;
    }

        .breadcrumb li {
            white-space: nowrap;
            color: #666;
        }

            .breadcrumb li a {
                color: inherit;
                text-decoration: none;
            }

                .breadcrumb li a:hover {
                    text-decoration: underline;
                    color: #0b0b0b;
                }

            .breadcrumb li + li::before {
                content: "›";
                color: #ccc;
                padding-right: 6px;
            }

        .breadcrumb .active {
            font-weight: 600;
            color: #0b0b0b;
        }

    /***** Start - Css style moved from Master page to this file *****/
    :root {
        --header-height: 0px;
        --sidebar-width: 340px;
        --menu-width: 340px;
    }

    /* Adjust z-index so the sidebar menu is above the header when open/pinned */
    .menu-container {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-width);
        height: 100vh;
        box-sizing: border-box;
        z-index: 11000; /* raised so menu is on top of the header */
        background: #fff;
        overflow: hidden;
        transform: translateX(-110%);
        transition: transform .28s ease;
    }

    .menu {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.12) transparent;
    }

    .menu-container .menu {
        height: 100% !important;
        overflow: auto !important;
        box-sizing: border-box !important;
    }

    /* Default: main content uses full width (menu overlays when opened) */
    .main-content {
        margin-left: 0;
        min-height: 100vh;
        box-sizing: border-box;
        transition: margin-left .28s ease;
    }

    /* ONLY pinned menu should push the layout */
    body.menu-sticky .main-content,
    #menuContainer.sticky ~ .main-content {
        margin-left: var(--menu-width) !important;
    }

    /* Scrollbar styling */
    .menu::-webkit-scrollbar {
        width: 8px;
    }

    .menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .menu::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.12);
        border-radius: 6px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }

        .menu::-webkit-scrollbar-thumb:hover {
            background: rgba(0,0,0,0.18);
        }

    /* Desktop: shift header content only when pinned */
    @media (min-width: 769px) {
        body.menu-sticky .hero .hero-body,
        #menuContainer.sticky ~ .hero .hero-body {
            margin-left: calc(var(--menu-width, var(--sidebar-width, 340px))) !important;
            max-width: calc(100% - var(--menu-width, var(--sidebar-width, 340px))) !important;
            box-sizing: border-box;
        }

        .navbar {
            margin-left: 0 !important;
        }
    }

    /* Small screens: menu overlays and does not shift content */
    @media (max-width: 768px) {
        :root {
            --sidebar-width: 220px;
            --menu-width: 220px;
        }

        .menu-container {
            width: var(--sidebar-width) !important;
            top: 0 !important;
            height: 100vh !important;
        }

        body.menu-sticky .main-content {
            margin-left: 0;
        }
    }

    /* ensure burger sits above the menu */
    .menu-burger {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 11010; /* above menu */
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ff5a2d;
        color: #fff;
        border-radius: 4px;
        border: none;
        cursor: pointer;
    }

    body.menu-sticky .menu-burger {
        display: none !important;
    }

    /* Do NOT elevate the header above the menu. Remove/override any rule that sets hero z-index above the menu */
    body.menu-sticky .hero {
        position: relative !important;
        z-index: 10990 !important; /* must be lower than .menu-container's z-index */
    }

    /* Welcome strip: only shift when pinned */
    .welcome-notification {
        height: 35px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .welcome-notification .welcome-inner {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }

    /* Remove any separate welcome shift — pinned layout is controlled by .main-content margin-left */
    body.menu-sticky .welcome-notification .welcome-inner,
    #menuContainer.sticky ~ .welcome-notification .welcome-inner,
    body.with-menu:not(.menu-sticky) .welcome-notification .welcome-inner {
        margin-left: 0 !important;
        max-width: 100% !important;
    }

    /* Ensure pinned header sits above menu visually */
    body.menu-sticky .hero {
        position: relative !important;
        z-index: 10005 !important;
    }

    /* Prevent layout shift when menu is opened temporarily (body.with-menu),
                   but allow shift when menu is pinned (body.menu-sticky or #menuContainer.sticky). */
    body.with-menu:not(.menu-sticky) .main-content,
    body.with-menu:not(.menu-sticky) .hero .hero-body,
    body.with-menu:not(.menu-sticky) .welcome-notification .welcome-inner {
        margin-left: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Revert padding-top hack (remove any .main-content padding-top rule you added earlier).
                   Instead ensure the welcome strip sits above the hero visually when menu is pinned,
                   but keep the header below the menu (menu remains top-most). */

    /* Make sure the hero stays below the menu but below the welcome strip */
    body.menu-sticky .hero {
        position: relative !important;
        z-index: 10000 !important; /* lower than the welcome strip when pinned */
    }

    /* Ensure welcome strip is visible above the hero when pinned (no extra vertical gap) */
    body.menu-sticky .welcome-notification {
        position: relative !important;
        z-index: 10010 !important; /* above hero but below the menu (menu z-index = 11000) */
        margin-top: 0 !important;
    }

    /* Remove any previously-added .main-content padding-top so we don't double-space the layout */
    .main-content {
        padding-top: 0 !important;
    }
    
    /***** End - Css style moved from Master page to this file *****/

/**************************/
/* Sidebar container: full viewport and column layout so inner .menu can scroll.
   Keep the container at top:0 so it occupies full height; offset the scrollable
   content when pinned using the runtime --header-height. */
.menu-container {
    position: fixed;
    left: 0;
    top: 0; /* cover the full viewport — do not push container down */
    width: var(--menu-width);
    height: 100vh; /* full viewport height */
    box-sizing: border-box;
    z-index: 11000; /* keep above header if needed */
    background: #fff;
    overflow: hidden; /* outer container hides overflow, inner .menu scrolls */
    transition: transform .28s ease;
    transform: translateX(-110%);
    display: flex;
    flex-direction: column; /* header/pin area sits above; .menu fills below */
    padding: 8px 12px 12px 12px;
}

    /* When open or sticky the container slides in as before */
    .menu-container.open,
    .menu-container.sticky {
        transform: translateX(0);
    }

/* Menu (the scrollable area) fills remaining vertical space in the container */
.menu {
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto; /* grow to fill container height and allow scrolling */
    padding-top: 8px; /* base top padding for search/close spacing */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;
}

/* When pinned, offset the scrollable menu content so items start below header/logo.
   JS keeps --header-height updated on load/resize; add a small buffer (8px) for spacing. */
body.menu-sticky .menu,
.menu-container.sticky .menu {
    padding-top: calc(var(--header-height, 0px) + 8px) !important;
}

/* Keep the existing scrollbar styling for WebKit */
.menu::-webkit-scrollbar {
    width: 8px;
}

.menu::-webkit-scrollbar-track {
    background: transparent;
}

.menu::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

    .menu::-webkit-scrollbar-thumb:hover {
        background: rgba(0,0,0,0.18);
    }

/* Mobile: place menu container below header visually but keep container full viewport.
   The pinned state will add internal padding so items remain reachable. */
@media (max-width: 768px) {
    .menu-container {
        width: calc(100% - 16px);
        left: 8px;
        top: 8px; /* small inset on mobile */
        height: calc(100vh - 16px);
        border-radius: 6px;
    }

    /* keep menu scroll behavior the same */
    .menu {
        flex: 1 1 auto;
    }

    /* pinned visual offset on mobile */
    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        padding-top: calc(var(--header-height, 0px) + 8px) !important;
    }
}

/**************************/
/* Ensure pin/close sit above the search input */
.menu-pin,
.menu-close {
    z-index: 11020 !important; /* above menu (11000) and above search box */
}

/* Base: make sure pinned menu doesn't add a huge top gap by default */
body.menu-sticky .menu,
.menu-container.sticky .menu {
    padding-top: 8px !important;
}

/* Desktop: offset menu content below header but clamp so it can't be excessively large.
   JS keeps --header-height updated on load/resize. We subtract ~72px (logo area + small buffer)
   so the visible menu items sit below the header/logo rather than pushed way down. */
@media (min-width: 769px) {
    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        /* ensure at least 8px, otherwise use header-based offset reduced by 72px */
        padding-top: max(8px, calc(var(--header-height, 0px) - 72px)) !important;
    }

    /* Slightly reduce container padding so header area doesn't add extra blank space */
    .menu-container {
        padding-top: 6px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Small-screen behavior: keep small padding and leave visual pin/close unchanged */
@media (max-width: 768px) {
    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        padding-top: 8px !important;
    }
}

/* Overrides to fix search-box overlap and excessive top-gap when pinned */

/* Raise pin/close above all interactive elements (already set earlier, keep as-is) */
.menu-pin,
.menu-close {
    z-index: 11020 !important;
}

/* Ensure search box sits below the pin/close icons so they never overlap it.
   A modest top margin keeps the input visually separated across breakpoints. */
.search-box {
    margin-top: 28px !important;
}

/* Smaller spacing on narrow viewports */
@media (max-width: 768px) {
    .search-box {
        margin-top: 12px !important;
    }
}

/* Clamp pinned offset so header-based offset can't create a huge blank area.
   JS updates --header-height; clamp() keeps padding in a reasonable range.
   This replaces previous calc(var(--header-height) + 8px) behavior. */
body.menu-sticky .menu,
.menu-container.sticky .menu {
    padding-top: clamp(8px, calc(var(--header-height, 0px) - 44px), 56px) !important;
}

/* On small screens, keep small, fixed top padding so menu items are reachable */
@media (max-width: 768px) {
    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        padding-top: 8px !important;
    }
}

/* Reduce any extra container top padding that could contribute to the visible gap.
   This keeps the container compact while the internal .menu padding positions items. */
.menu-container {
    padding-top: 6px !important;
}

    /* Simplify pinned top offset: no header-based calc to avoid large empty gap.
   Keep a small, consistent internal top padding so menu items and search are positioned nicely. */
    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        padding-top: 8px !important; /* small fixed padding avoids huge blank area */
    }

/* Keep pin/close above other elements (already present). */
.menu-pin,
.menu-close {
    z-index: 11020 !important;
}

/* Ensure search box has modest spacing below the top controls */
.search-box {
    margin-top: 12px !important;
}

/* Mobile: keep small spacing */
@media (max-width: 768px) {
    .search-box {
        margin-top: 8px !important;
    }

    body.menu-sticky .menu,
    .menu-container.sticky .menu {
        padding-top: 8px !important;
    }
}

/* Ensure pin/close stable position and above everything */
.menu-close,
.menu-pin {
    z-index: 11030 !important;
    top: 8px !important; /* align with each other */
}

/* Pin sits left of close */
.menu-close {
    right: 8px !important;
}

.menu-pin {
    right: 44px !important;
}

/* Place the search box below the controls so they never overlap.
   Desktop: larger gap to account for control size + buffer.
   Mobile: smaller gap to keep layout compact. */
.search-box {
    margin-top: 25px !important;
}

@media (max-width: 768px) {
    .search-box {
        margin-top: 18px !important;
    }

    .menu-close,
    .menu-pin {
        top: 8px !important;
    }
}

/* Keep pinned menu content compact (no large header-driven gaps) */
body.menu-sticky .menu,
.menu-container.sticky .menu {
    padding-top: 8px !important;
}

/***********To handle welcome strip text wrapping on small screens*****************/
/* Welcome strip: stable two-column layout, left truncates, right stays intrinsic */
/* Ensure welcome strip uses the available header space and shows full welcome text on one line */
.welcome-notification .welcome-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important; /* left takes remaining space, right stays intrinsic */
    align-items: center !important;
    gap: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Left area: allow shrink & truncate */
.welcome-notification .welcome-left {
    min-width: 0 !important; /* allow the grid column to shrink/grow correctly */
    white-space: nowrap !important; /* keep the welcome text on a single line */
    overflow: visible !important; /* do not clip the content */
    text-overflow: clip !important;
    display: block !important;
}

/* Right meta: do NOT force a calc-based left margin when pinned */
/* Constrain the right-side meta so it doesn't steal horizontal space */
.welcome-notification .welcome-meta {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    max-width: 360px !important; /* tune this value to match your header layout */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* When menu is pinned/open ensure the welcome row uses the same layout */
body.menu-sticky .welcome-notification .welcome-inner,
body.with-menu .welcome-notification .welcome-inner {
    grid-template-columns: 1fr auto;
}

/* Explicitly protect pinned/open states from older truncation rules */
body.menu-sticky .welcome-notification .welcome-left,
body.with-menu .welcome-notification .welcome-left {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Keep mobile behavior: allow wrapping on narrow screens */
@media (max-width: 768px) {
    .welcome-notification .welcome-inner {
        display: block !important;
    }

    .welcome-notification .welcome-left {
        white-space: normal !important;
        text-overflow: clip !important;
    }

    .welcome-notification .welcome-meta {
        display: block !important;
        margin-left: 0 !important;
    }
}
/***************************/
