
/* ==========================================================
   WASTELAND ASCENT - GLOBAL SIDEBAR UPDATE v3.4

   Shared across Dashboard, Gym, Inventory, Scavenge, etc.
   Does NOT alter the top HUD or main page layouts.
========================================================== */

:root {
    --wa-sidebar-profile-size: 180px;
}

.sidebar .sidebar-admin-refill,
.sidebar .sidebar-admin-level { cursor: pointer; }
.sidebar .sidebar-admin-level:focus-visible { outline: 2px solid #b49a45; outline-offset: 3px; }
.sidebar .sidebar-admin-refill:hover,
.sidebar .sidebar-admin-refill:focus-visible {
    outline: 1px solid #b49a45;
    outline-offset: 2px;
}
.sidebar .sidebar-admin-refill[aria-disabled="true"] { cursor: wait; }

/* Compact hazard-strip level plate. */
.sidebar .sidebar-level-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    min-width: 112px;
    height: 28px;
    box-sizing: border-box;
    padding: 0 23px;
    overflow: hidden;
    border: 1px solid #9d8753;
    border-radius: 3px;
    background: linear-gradient(180deg, #303029, #121610 48%, #20221a);
    box-shadow: inset 0 0 0 2px #10130e, 0 2px 3px #0008;
    color: #eee3c5;
    font: 800 12px/1 "Arial", sans-serif;
    letter-spacing: .07em;
    text-shadow: 0 1px 1px #000;
}

.sidebar .sidebar-level-badge::before,
.sidebar .sidebar-level-badge::after {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    width: 17px;
    background: repeating-linear-gradient(135deg, #b49a45 0 5px, #1b1e15 5px 10px);
    box-shadow: inset 0 0 3px #0009;
}

.sidebar .sidebar-level-badge::before { left: 2px; }
.sidebar .sidebar-level-badge::after { right: 2px; }
.sidebar .sidebar-level-badge b {
    font-size: 16px;
    line-height: 1;
}

/* ----------------------------------------------------------
   PROFILE AREA
---------------------------------------------------------- */

.sidebar .sidebar-profile {
    padding: 20px 10px 12px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    gap: 8px !important;

    min-height: 0 !important;
}

.sidebar .sidebar-profile-frame {
    width: var(--wa-sidebar-profile-size) !important;
    height: var(--wa-sidebar-profile-size) !important;

    min-width: var(--wa-sidebar-profile-size) !important;
    min-height: var(--wa-sidebar-profile-size) !important;

    flex: 0 0 var(--wa-sidebar-profile-size) !important;

    position: relative !important;

    /* Breathing room for rank/prestige artwork outside the portrait. */
    margin: 0 0 8px !important;
    overflow: visible !important;

    padding: 5px !important;

    border: 2px solid rgba(134, 238, 72, .95) !important;

    background:
        linear-gradient(
            180deg,
            rgba(31, 54, 28, .92),
            rgba(7, 15, 11, .98)
        ) !important;

    box-shadow:
        0 0 0 1px rgba(184, 133, 47, .78),
        0 0 14px rgba(79, 229, 70, .20),
        inset 0 0 12px rgba(0, 0, 0, .72) !important;
}

.sidebar .sidebar-profile-frame img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
    object-position: center 20% !important;
}

.sidebar .sidebar-profile-border {
    position: absolute !important;

    inset: -6px !important;

    pointer-events: none !important;

    border: 2px solid rgba(184, 133, 47, .58) !important;

    box-shadow:
        inset 0 0 0 1px rgba(116, 231, 71, .20) !important;
}

.sidebar .sidebar-online-dot {
    width: 12px !important;
    height: 12px !important;

    right: 5px !important;
    bottom: 5px !important;

    border: 2px solid #07100b !important;
}

.sidebar .sidebar-profile-copy {
    width: 100% !important;

    text-align: center !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    gap: 2px !important;
}

.sidebar .sidebar-profile-copy strong,
.sidebar #sidebarUsername {
    font-size: 16px !important;
    line-height: 1.15 !important;

    letter-spacing: .035em !important;
}

.sidebar .sidebar-profile-copy span,
.sidebar #sidebarRole {
    font-size: 9px !important;
    line-height: 1.25 !important;

    color: #b7c0b9 !important;
}

/* ----------------------------------------------------------
   PLAYER RESOURCE BARS
---------------------------------------------------------- */

.sidebar-player-bars {
    width: calc(100% - 10px);

    margin: 4px auto 0;

    padding: 8px 8px 7px;

    display: grid;
    gap: 6px;

    border-top: 1px solid rgba(175, 120, 43, .30);
    border-bottom: 1px solid rgba(175, 120, 43, .18);

    background:
        linear-gradient(
            180deg,
            rgba(7, 16, 14, .86),
            rgba(3, 9, 8, .92)
        );
}

.sidebar-resource {
    --bar-color: #81e74f;

    min-width: 0;
}

.sidebar-resource-head {
    margin-bottom: 3px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    font-size: 8px;
    line-height: 1;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-resource-head span {
    color: #cbd3cd;
    font-weight: 800;
}

.sidebar-resource-head strong {
    color: #e9eee9;
    font-size: 8px;
    font-weight: 800;

    white-space: nowrap;
}

.sidebar-resource-track {
    height: 5px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .10);

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .78),
            rgba(16, 22, 18, .92)
        );

    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, .78);
}

.sidebar-resource-fill {
    width: 0%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--bar-color) 65%, #182017),
            var(--bar-color)
        );

    box-shadow:
        0 0 7px color-mix(in srgb, var(--bar-color) 42%, transparent);

    transition: width .22s ease;
}

.sidebar-resource.health {
    --bar-color: #df574a;
}

.sidebar-resource.energy {
    --bar-color: #72e24d;
}

.sidebar-resource.nerve {
    --bar-color: #e06445;
}

.sidebar-resource.awake {
    --bar-color: #c5e94c;
}

.sidebar-resource.experience {
    --bar-color: #d6a942;
}

/* ----------------------------------------------------------
   REMOVE MARKED LEFT MENU ITEMS
---------------------------------------------------------- */

/* JS removes them completely. These two icon rules are an
   immediate CSS fallback while the shared sidebar is loading. */

.sidebar nav .nav-link:has(.icon-missions),
.sidebar nav .nav-link:has(.icon-market) {
    display: none !important;
}

/* Bottom slogan/graffiti marked for removal. */
.sidebar .graffiti {
    display: none !important;
}

/* Keep remaining nav items clean after the removals. */
.sidebar nav {
    min-height: 0 !important;
}

@media (max-height: 850px) {
    .sidebar-player-bars {
        gap: 4px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}


/* ----------------------------------------------------------
   CASH / BANK / LOCATION
   Text rows only — intentionally no progress bars.
---------------------------------------------------------- */

.sidebar-player-info {
    margin-top: 3px;
    padding-top: 8px;

    display: grid;
    gap: 7px;

    border-top:
        1px solid
        rgba(175, 120, 43, .26);
}

.sidebar-info-row {
    min-width: 0;

    display: grid;
    grid-template-columns:
        18px
        auto
        minmax(0, 1fr);

    align-items: center;

    column-gap: 7px;

    min-height: 19px;
}

.sidebar-info-icon {
    width: 17px;
    height: 17px;

    display: block;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 4px
            rgba(240, 172, 66, .16)
        );
}

.sidebar-info-row > span {
    color: #d2d7d2;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .055em;

    text-transform: uppercase;
}

.sidebar-info-row > strong {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #eeeeea;

    font-size: 8px;
    font-weight: 900;

    text-align: right;
}

/* ----------------------------------------------------------
   LOGOUT — DOOR / EXIT ICON
   Only the logout presentation is changed.
---------------------------------------------------------- */

.sidebar .logout-link.wasteland-exit-button {
    flex: 0 0 auto !important;

    width: auto !important;
    height: auto !important;
    min-height: 46px !important;

    margin:
        clamp(5px, .8vh, 8px)
        0
        0 !important;

    padding:
        7px
        clamp(11px, .8vw, 15px) !important;

    display: flex !important;
    align-items: center !important;

    gap:
        clamp(8px, .7vw, 12px) !important;

    border: 0 !important;
    border-top:
        1px solid
        rgba(169, 135, 69, .25) !important;

    background: none !important;

    color: #c6cbc5 !important;

    box-shadow: none !important;

    overflow: visible !important;

    transition:
        color .15s ease,
        background .15s ease !important;
}

.sidebar .logout-link.wasteland-exit-button:hover {
    transform: none !important;

    color: #ff6b5f !important;

    background:
        linear-gradient(
            90deg,
            rgba(94, 29, 24, .34),
            rgba(16, 12, 11, .08)
        ) !important;

    filter: none !important;
}

.sidebar .logout-link.wasteland-exit-button:active {
    transform: none !important;
    filter: none !important;
}

.sidebar .logout-link.wasteland-exit-button .logout-door-icon {
    width:
        clamp(21px, 1.45vw, 26px) !important;

    height:
        clamp(21px, 1.45vw, 26px) !important;

    min-width:
        clamp(21px, 1.45vw, 26px) !important;

    display: block !important;

    object-fit: contain !important;

    flex: 0 0 auto !important;
}

.sidebar .logout-link.wasteland-exit-button > span {
    display: block !important;

    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size:
        clamp(9px, .68vw, 11px);
}

/* ----------------------------------------------------------
   INLINE SIDEBAR ICONS v3
   No external SVG files required.
---------------------------------------------------------- */
.sidebar-inline-icon {
    width: clamp(17px, 1.15vw, 21px);
    height: clamp(17px, 1.15vw, 21px);
    min-width: clamp(17px, 1.15vw, 21px);
    display: inline-grid;
    place-items: center;
    color: currentColor;
    flex: 0 0 auto;
}

.sidebar-inline-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-info-icon-inline {
    width: 17px;
    height: 17px;
    display: inline-grid;
    place-items: center;
    color: #f2b544;
}

.sidebar-info-icon-inline svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-player-info .sidebar-wallet-button{background:none;border:0;color:inherit;font:inherit;text-align:left;width:100%;cursor:pointer;padding:0}.wallet-dialog{width:min(360px,calc(100vw - 32px));padding:24px;background:#111c15;color:#e3d3a8;border:1px solid #937b40;border-radius:5px;box-shadow:0 20px 80px #000b;font-family:Arial,sans-serif}.wallet-dialog::backdrop{background:#0009}.wallet-dialog h2{font-size:19px;color:#e4c67c;margin:0 0 20px}.wallet-dialog p,.wallet-dialog label{font-size:13px;line-height:1.5}.wallet-dialog button{background:#4b4225;color:#ebd5a0;border:1px solid #9a8247;padding:11px;cursor:pointer;margin:5px 0}.wallet-dialog button:disabled{opacity:.45}.wallet-dialog [data-refill]{display:block;width:100%;text-align:left}.wallet-dialog .wallet-close{float:right;margin:-14px -12px 0 0;background:transparent;border:0;font-size:22px}.wallet-dialog input{box-sizing:border-box;width:100%;padding:10px;margin:10px 0;background:#08120c;color:#e4d7b7;border:1px solid #657049}.wallet-dialog :focus-visible,[data-wallet]:focus-visible{outline:2px solid #e4c67c;outline-offset:2px}
.wallet-dialog{position:fixed;inset:0;margin:auto;height:fit-content;max-height:calc(100vh - 32px);overflow:auto}
.sidebar-player-info .sidebar-bank-link{color:inherit;text-decoration:none;cursor:pointer}
.sidebar-player-info .sidebar-bank-link:focus-visible{outline:1px solid #e8c278;outline-offset:2px}
.sidebar .sidebar-name-link{display:flex;align-items:center;justify-content:center;gap:7px;max-width:100%;min-width:0}.sidebar .sidebar-name-link #sidebarUsername{min-width:0;flex:0 1 auto}.sidebar .sidebar-name-emblem{position:relative;display:block;flex:0 0 40px;width:40px;height:32px;margin:0;overflow:hidden;mix-blend-mode:normal}.sidebar .sidebar-name-emblem[hidden]{display:none}.sidebar .sidebar-name-emblem img{position:absolute;max-width:none;max-height:none;border:0;border-radius:0;margin:0;object-fit:fill;pointer-events:none}
.sidebar-paid-refill{cursor:pointer}.sidebar-paid-refill:hover{filter:brightness(1.15)}.sidebar-paid-refill:focus-visible{outline:2px solid #e4c67c;outline-offset:3px}
#sidebarRefillStatus{margin:6px 10px;color:#d9c38c;font:11px/1.4 Arial,sans-serif}#sidebarRefillStatus:empty{display:none}.sidebar-paid-refill[aria-busy="true"]{cursor:wait}
.sidebar .sidebar-name-emblem{mix-blend-mode:normal;background:transparent}.sidebar .sidebar-name-emblem img{filter:none}
.sidebar .sidebar-name-emblem--dogtags img{filter:none}

/* Clearly separate player navigation from admin tools. */
.sidebar #sharedNavigation .sidebar-menu-heading {
    display:block;
    margin:14px 8px 7px;
    padding:10px 11px;
    border:1px solid #665536;
    border-left:3px solid #d3af61;
    background:linear-gradient(90deg,#302b1d,#1a1c17);
    color:#f0d697;
    font-size:12px;
    font-weight:800;
    line-height:1.3;
    letter-spacing:1.4px;
    text-transform:uppercase;
    box-shadow:inset 0 1px 0 #ffffff08;
}
.sidebar #adminNavigation .sidebar-menu-heading {margin-top:20px;}

/* Player links use fixed-width gold silhouettes for easy scanning. */
.sidebar #sharedNavigation > .nav-link[data-page]{display:flex;align-items:center;gap:10px}
.sidebar #sharedNavigation .player-menu-icon{display:inline-block;width:19px;height:19px;flex:0 0 19px;background-color:#c9ad70;-webkit-mask:var(--menu-icon) center/contain no-repeat;mask:var(--menu-icon) center/contain no-repeat}
.sidebar #sharedNavigation > .nav-link:hover .player-menu-icon,
.sidebar #sharedNavigation > .nav-link:focus-visible .player-menu-icon,
.sidebar #sharedNavigation > .nav-link.active .player-menu-icon{background-color:#f0d697}

/* Override the shell's text-only navigation spacing. */
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link[data-page]{display:grid;grid-template-columns:19px minmax(0,1fr);column-gap:10px;align-items:center;justify-content:start;padding:7px 20px;min-height:34px;box-sizing:border-box;flex:0 0 auto;text-align:left}
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link[data-page] > .player-menu-icon{display:block;width:19px;height:19px;margin:0;align-self:center;justify-self:center}
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link[data-page] > span:last-child{display:block;margin:0;min-width:0;line-height:19px;text-align:left}

body #sharedSidebar.sidebar #sharedNavigation > a.nav-link.has-public-bosses{background:#541b1b!important;color:#ffb4ac!important;border-left:3px solid #e6564c}
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link.has-public-bosses > span:last-child{color:#ffb4ac!important;font-weight:700}
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link.can-host-boss{background:#234326!important;color:#c9ebbd!important;border-left:3px solid #7cba63}
body #sharedSidebar.sidebar #sharedNavigation > a.nav-link.can-host-boss > span:last-child{color:#c9ebbd!important;font-weight:600}
/* Boxed resource indicators and compact live regeneration counters. */
body #sharedSidebar .sidebar-resource-track{position:relative;height:12px;border:1px solid #867043;border-radius:2px;background:#121710;overflow:hidden;box-shadow:inset 0 1px 3px #000}
body #sharedSidebar .sidebar-resource-track::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 2px),#10150e calc(10% - 2px),#10150e 10%);box-shadow:inset 0 1px 0 #ffffff20}
body #sharedSidebar .sidebar-regen{display:flex;justify-content:space-between;gap:6px;margin-top:4px;color:#c9ad70;font-size:9px;line-height:1.4;font-variant-numeric:tabular-nums;letter-spacing:0;text-transform:none}

/* Sweep light across the emblem artwork while preserving its transparent edges. */
.sidebar .sidebar-emblem-shine{position:absolute;inset:0;pointer-events:none;mask-image:linear-gradient(110deg,transparent 42%,#fff 50%,transparent 58%);mask-size:300% 100%;mask-repeat:no-repeat;animation:sidebar-emblem-shine 5s ease-in-out infinite}
.sidebar .sidebar-emblem-shine img{filter:brightness(2.1) saturate(.65)}
@keyframes sidebar-emblem-shine{0%,65%{mask-position:150% 0;opacity:0}68%{opacity:.85}95%{opacity:.85}100%{mask-position:-50% 0;opacity:0}}
@media(prefers-reduced-motion:reduce){.sidebar .sidebar-emblem-shine{animation:none;display:none}}

/* Sidebar identity: prominent name and emblem, separate faction badge. */
.sidebar .sidebar-name-link{gap:5px;width:100%;margin-bottom:5px}
.sidebar #sidebarUsername{font-size:17px!important;line-height:1.2!important;letter-spacing:0!important;color:#f1ead6;overflow-wrap:anywhere;text-align:center}
.sidebar .sidebar-name-emblem{zoom:.85;flex-shrink:0}
.sidebar #sidebarFactionTag{display:inline-flex;align-items:center;justify-content:center;margin:0 0 5px;padding:4px 10px;border:1px solid #a98b4d;border-radius:4px;background:linear-gradient(135deg,#35321e,#191e14);color:#ebc875;font:700 11px/1.2 Arial,sans-serif;letter-spacing:.5px;text-decoration:none}
.sidebar #sidebarFactionTag[hidden]{display:none}
.sidebar #sidebarFactionTag:hover{border-color:#e3bf70;background:#353722;color:#ffe3a0}
.sidebar #sidebarFactionTag:focus-visible{outline:2px solid #e3bf70;outline-offset:2px}
.sidebar #sidebarSetIcons{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-height:28px;width:100%;margin:0 0 7px;order:-3}
.sidebar #sidebarSetIcons[hidden]{display:none!important}
.sidebar #sidebarSetIcons img{display:block;width:28px;height:28px;object-fit:contain;margin:0;padding:0;border:0;background:none;flex:0 0 28px}
