/* =====================================================
   NAVBAR — Theme Overrides (clean)
   Put this in: assets/css/components/navbar.css
   ===================================================== */

/* Base navbar buttons */
nav .ui.button{
    color: #ffffff;
    background: rgb(110,106,130);
}

/* Hover / focus states */
nav .ui.button:hover,
nav .ui.button:focus{
    color: #ffffff !important;
    background: rgba(110,106,130,0.6) !important;
    transition: all .5s;
}

/* =====================================================
   NAVBAR — Disabled "Coming soon" button
   ===================================================== */
.ui.menu .item.nav-item--disabled{
    cursor: default;
    user-select: none;
    pointer-events: none;
    color: rgba(255,255,255,0.45) !important;
}
.ui.menu .item.nav-item--disabled i.icon{ opacity: 0.6; }
.ui.menu .item.nav-item--disabled .nav-coming-soon{
    margin-left: 6px;
    font-size: 0.85em;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}

/* ================================
   NAVBAR: match sticky-search style
================================ */
#siteNav.ui.top.fixed.menu{
    background: rgba(10, 15, 31, 0.92) !important;
    border-bottom: 1px solid rgba(255,255,255,0.10) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Keep semantic spacing but ensure consistent vertical centering */
#siteNav.ui.menu > .ui.container{
    display: flex !important;
    align-items: center !important;
}

/* IMPORTANT: Do NOT force all .item to inline-flex (breaks header/logo) */
#siteNav.ui.menu .item{
    color: rgba(255,255,255,0.92) !important;
    line-height: 1 !important;
}

/* Only normal nav links should get icon/text flex alignment */
#siteNav.ui.menu a.item:not(.header){
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
}

/* ============================
   LOGO — restore original feel
   ============================ */
#siteNav.ui.menu a.header.item{
    display: flex !important;
    align-items: center !important;
    padding: 0.9rem 1.1rem !important;  /* close to semantic default */
}
#siteNav.ui.menu a.header.item img.navIcon{
    height: 40px !important;  /* restore original size */
    width: auto !important;
    display: block !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: contain !important;
}

/* ================================
   CENTER SEARCH SLOT
================================ */
#siteNav .nav-search-item{
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    border-left: 0 !important;
    border-right: 0 !important;
}

#siteNav .nav-search-box{
    width: min(560px, 40vw);
    max-width: 40%;
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 12px;          /* reduced to fit slim nav */
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);

    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;

    transition: opacity 220ms ease, transform 220ms ease;
}

#siteNav .nav-search-box input{
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: rgba(255,255,255,0.95);
}

#siteNav .nav-search-box input::placeholder{
    color: rgba(255,255,255,0.70);
}

#siteNav .nav-search-box button{
    border: 0;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(138,149,255,0.35);
    color: rgba(255,255,255,0.95);
    cursor: pointer;
}

#siteNav.nav--search-active .nav-search-box{
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 900px){
    #siteNav .nav-search-box{
        width: min(420px, 60vw);
        max-width: 60%;
    }
}
@media (max-width: 620px){
    #siteNav .nav-search-item{ display: none; }
}

/* ============================
   ICON ALIGNMENT (Discord + Semantic icons)
   ============================ */
#siteNav .navDiscordIcon{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px;
    height: 18px;
}
#siteNav .navDiscordIcon svg{
    width: 18px;
    height: 18px;
    display: block !important;
    fill: currentColor;
    transform: translateY(1px);
}

/* Slight normalization for semantic icons */
#siteNav .item > i.icon{
    transform: translateY(1px);
}

/* =========================================
   Reduce overall nav height back to original
   (keep logo large without increasing bar)
   ========================================= */

/* Hard cap the menu height + center content */
#siteNav.ui.top.fixed.menu {
    min-height: 52px !important;      /* match original-ish bar height */
    padding: 0 !important;
}

#siteNav.ui.menu > .ui.container {
    min-height: 52px !important;
    align-items: center !important;
}

/* Make ALL items use compact vertical padding */
#siteNav.ui.menu .item {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Header item was inflating height — override it */
#siteNav.ui.menu a.header.item {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Keep logo big, but contained */
#siteNav.ui.menu a.header.item img.navIcon {
    height: 40px !important;
}

/* =========================================
   NAV LAYOUT: full-width feel + stable flex
   ========================================= */

/* Make the nav container behave like "full width", not page content width */
#siteNav.ui.menu > .ui.container{
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Ensure left items stay on left, right menu stays on right */
#siteNav.ui.menu > .ui.container{
    display: flex !important;
    align-items: center !important;
}
#siteNav.ui.menu .right.menu{
    margin-left: auto !important; /* push right cluster to the far right */
}

/* Keep icon/text alignment consistent on ALL widths */
#siteNav.ui.menu a.item:not(.header){
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap;
}

/* =========================================
   RESPONSIVE: prevent "drift" on small widths
   ========================================= */
@media (max-width: 900px){
    #siteNav.ui.menu > .ui.container{
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* Slightly tighter spacing so things don't wrap awkwardly */
    #siteNav.ui.menu .item{
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 620px){
    /* Keep left group + right group aligned; hide center search already handled */
    #siteNav.ui.menu .item{
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* =========================================
   MOBILE: keep right-side actions visible
   - collapse labels to icons
   - reduce spacing
   ========================================= */

@media (max-width: 720px){
    /* tighter horizontal padding for all items */
    #siteNav.ui.menu .item{
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Hide text labels on the RIGHT menu only (keep icons) */
    #siteNav .right.menu .item i.icon,
    #siteNav .right.menu .item svg,
    #siteNav .right.menu .item .navDiscordIcon{
        font-size: 14px !important;
    }

    /* Keep a tiny gap between icons and their now-hidden text */
    #siteNav .right.menu .item i.icon{
        margin-right: 0 !important;
    }

    /* Make Discord label disappear but keep icon */
    #siteNav .right.menu .item .navDiscordIcon{
        margin-right: 0 !important;
    }
}

/* If still tight, also collapse LEFT labels (Home/Sponsored) */
@media (max-width: 520px){
    #siteNav a.item:not(.header){
        font-size: 0 !important;
    }
    #siteNav a.item:not(.header) i.icon,
    #siteNav a.item:not(.header) svg,
    #siteNav a.item:not(.header) .navDiscordIcon{
        font-size: 14px !important;
    }

    /* Keep "(Coming soon)" hidden completely at this width */
    #siteNav .nav-coming-soon{
        display: none !important;
    }
}

/* =========================================
   MOBILE FIX: allow right menu to appear
   by wrapping to a second row
   ========================================= */

@media (max-width: 760px){
    /* Allow wrapping instead of clipping */
    #siteNav.ui.menu > .ui.container{
        flex-wrap: wrap !important;
    }

    /* Left-side items stay on row 1 */
    #siteNav.ui.menu > .ui.container > a.header.item,
    #siteNav.ui.menu > .ui.container > a.item,
    #siteNav.ui.menu > .ui.container > .nav-search-item{
        flex: 0 0 auto;
    }

    /* Right menu moves to row 2 and aligns right */
    #siteNav.ui.menu > .ui.container > .right.menu{
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-end !important;
    }

    /* Slightly tighter padding on row 2 */
    #siteNav.ui.menu > .ui.container > .right.menu .item{
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

/* Even smaller: reduce left clutter so row 1 doesn’t wrap too */
@media (max-width: 520px){
    /* Hide Sponsored text + coming soon (keep icon) */
    #siteNav.ui.menu a.item.nav-item--disabled{
        font-size: 0 !important;
    }
    #siteNav.ui.menu a.item.nav-item--disabled i.icon{
        font-size: 14px !important;
    }
    #siteNav .nav-coming-soon{
        display: none !important;
    }
}

/* =====================================================
   MOBILE WRAP FIX — stop clipping the right menu
   ===================================================== */
@media (max-width: 760px){

    /* Let the fixed navbar grow taller when it wraps */
    #siteNav.ui.top.fixed.menu{
        height: auto !important;
        min-height: 0 !important;          /* overrides your 52px cap */
        overflow: visible !important;
    }

    #siteNav.ui.menu > .ui.container{
        min-height: 0 !important;          /* overrides your 52px cap */
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    /* Put right menu on its own row and KEEP IT VISIBLE */
    #siteNav.ui.menu .right.menu{
        display: flex !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-end !important;
        overflow: visible !important;
    }

    /* give the second row a little breathing room */
    #siteNav.ui.menu .right.menu .item{
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

/* =========================================================
   NAVBAR RESPONSIVE PATCH (DROP-IN)
   Fix: right-side icons sliding off-screen on small widths
   Cause: .nav-search-item still takes layout width when "hidden"
   Paste this block at the VERY BOTTOM of navbar.css
   ========================================================= */

/* Make sure flex children are allowed to shrink correctly */
#siteNav.ui.menu > .ui.container{
    min-width: 0 !important;
}

/* Prevent the right menu from shrinking off the edge */
#siteNav.ui.menu .right.menu{
    flex-shrink: 0 !important;
}

/* --- Core fix: search slot should NOT reserve space unless active --- */
#siteNav .nav-search-item{
    display: none !important;           /* remove from layout by default */
}

/* Only show + allow it to grow when search is active */
#siteNav.nav--search-active .nav-search-item{
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* (Optional) If your search input can overflow, keep it contained */
#siteNav.nav--search-active .nav-search-item .nav-search,
#siteNav.nav--search-active .nav-search-item input{
    min-width: 0 !important;
}

/* =========================================================
   NAV "FIT" LOGIC (DROP-IN)
   Goal:
   - Search keeps a reasonable min width
   - When space gets tight, labels collapse to icons
   Paste at VERY BOTTOM of navbar.css
   ========================================================= */

/* Keep navbar on one row (no "row 2" wrap behavior) */
#siteNav.ui.menu > .ui.container{
    flex-wrap: nowrap !important;
    min-width: 0 !important;
}

#siteNav.ui.menu .right.menu{
    flex-shrink: 0 !important;
}

/* Search should exist when active and have a reasonable min width */
#siteNav.nav--search-active .nav-search-item{
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* The actual search pill sizing */
#siteNav.nav--search-active .nav-search-box{
    width: clamp(340px, 42vw, 560px) !important; /* preferred responsive width */
    min-width: 340px !important;                 /* "reasonable" minimum */
    max-width: 560px !important;
}

/* ---------- FIT BREAKPOINT #1 ----------
   When the viewport is too tight for labels + search min,
   collapse labels to icons to "make it fit"
*/
@media (max-width: 1060px){
    #siteNav .navLabel,
    #siteNav .nav-coming-soon{
        display: none !important;
    }

    /* tighten item padding to buy space */
    #siteNav.ui.menu .item{
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ---------- FIT BREAKPOINT #2 ----------
   Even tighter: keep icons, but allow a slightly smaller (still usable) search min
*/
@media (max-width: 860px){
    #siteNav.nav--search-active .nav-search-box{
        width: clamp(280px, 55vw, 440px) !important;
        min-width: 280px !important;
        max-width: 440px !important;
    }

    #siteNav.ui.menu .item{
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* ---------- FIT BREAKPOINT #3 ----------
   Super small: keep search, but compact it further (still not tiny)
*/
@media (max-width: 680px){
    #siteNav.nav--search-active .nav-search-box{
        width: clamp(240px, 62vw, 360px) !important;
        min-width: 240px !important;
        max-width: 360px !important;
    }
}

/* =========================================================
   FIX: Only collapse labels to icons when nav search is active
   Paste at VERY BOTTOM of navbar.css
   ========================================================= */

/* If you previously hid labels at breakpoints, undo that by default */
#siteNav .navLabel,
#siteNav .nav-coming-soon{
    display: inline !important;
}

/* Now: ONLY when search is active AND width is tight -> icons only */
@media (max-width: 1060px){
    #siteNav.nav--search-active .navLabel,
    #siteNav.nav--search-active .nav-coming-soon{
        display: none !important;
    }

    #siteNav.nav--search-active.ui.menu .item{
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Tighter still: also shrink search min-width, but still only when active */
@media (max-width: 860px){
    #siteNav.nav--search-active .nav-search-box{
        width: clamp(280px, 55vw, 440px) !important;
        min-width: 280px !important;
        max-width: 440px !important;
    }

    #siteNav.nav--search-active.ui.menu .item{
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

@media (max-width: 680px){
    #siteNav.nav--search-active .nav-search-box{
        width: clamp(240px, 62vw, 360px) !important;
        min-width: 240px !important;
        max-width: 360px !important;
    }
}
