/* body-loadout-hud.css — WoW paper-doll loadout rendered as a HUD layer
   around the live lobby model. Mounted inside #lobby-stage-subject, so it
   tracks the model box exactly (same approach as .lobby-stage__annotations).

   Selectors namespaced .blh__*. Platform colors only — consumes
   tokens.css (cyan ring on dark glass). */

.blh {
    position: absolute;
    inset: 0;
    z-index: 4;                 /* above the model, below chat/nameplate chrome */
    pointer-events: none;       /* never blocks the model while inactive */
    opacity: 0;
    transition: opacity var(--dur-md) var(--ease-out);
}
.blh.is-active { opacity: 1; }

/* Hide while the hero is mid-swap or the stage is in context mode —
   matches how annotations/slots behave. */
.lobby-stage__subject[data-swapping="true"] .blh,
.lobby-stage[data-stage-mode="context"] .blh { display: none; }

/* In equip-mode the Brain/Voice/Body/Movement annotation lines + buttons
   are suppressed so only the loadout HUD reads — the user leaves via the
   Back arrow. !important beats the annotations' own :hover reveal rule. */
.lobby-stage__subject.blh-equip .lobby-stage__annotations {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* In equip-mode the nameplate reads as a character-sheet plate: drop the
   carousel dots and slide the name down into the space they held. Scoped
   to equip-mode via the subject's .blh-equip flag (nameplate is a later
   sibling of the subject). */
/* visibility (not display:none) so the dots keep their space — removing
   them from flow shrinks the nameplate, which lets the flex-grow subject
   expand and re-frames the model ("moves closer"). transform-only shift
   for the name is post-layout, so it never reflows the stage. */
.lobby-stage__subject.blh-equip ~ .lobby-stage__nameplate .lobby-stage__dots { visibility: hidden; }
.lobby-stage__subject.blh-equip ~ .lobby-stage__nameplate { transform: translateY(22px); }

/* ── Columns flank the model; weapon row sits beneath ───────────── */
.blh__col {
    /* Top-anchored (not vertically centered) so a reserved header band
       at the very top stays clear for the Back arrow — and so the Head
       slot reads as the topmost piece, WoW-style. */
    position: absolute;
    top: 48px;
    width: 64px;          /* = socket width: frames hug the column edge so
                             they line up with the Back arrow. */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform var(--dur-md) var(--ease-out), opacity var(--dur-md) var(--ease-out);
    opacity: 0;
}
.blh__col--left  { left: 6px;  transform: translateX(-14px); }
.blh__col--right { right: 6px; transform: translateX(14px); }
.blh.is-active .blh__col { opacity: 1; transform: translateX(0); }

.blh__row--bottom {
    /* WoW-style weapon bar: Main Hand · Off Hand · Ranged, together and
       centered, dropped below the box so it clears the figure's feet. */
    position: absolute;
    bottom: -6%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: transform var(--dur-md) var(--ease-out), opacity var(--dur-md) var(--ease-out);
}
.blh.is-active .blh__row--bottom { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Slot socket ────────────────────────────────────────────────── */
.blh__slot {
    position: relative;        /* tooltip anchor */
    display: block;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    pointer-events: none;
}
.blh.is-active .blh__slot { pointer-events: auto; }

.blh__slot-frame {
    position: relative;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--r-2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
        rgba(12, 16, 22, 0.40);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
    transition: border-color var(--dur-xs) var(--ease-out), box-shadow var(--dur-xs) var(--ease-out), background var(--dur-xs) var(--ease-out), transform var(--dur-xs) var(--ease-out);
}
.blh__slot-frame img { width: 100%; height: 100%; object-fit: cover; }
.blh__emoji { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55)); }

/* Empty socket = a well carved into the lobby: darker translucent fill,
   a strong inner top-shadow for depth + a faint bottom rim-light + an
   outer bottom bevel, holding a faded ghost icon of the gear that belongs
   there (WoW-style). */
.blh__slot:not(.is-filled) .blh__slot-frame {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.26) 100%),
        rgba(16, 20, 28, 0.5);
    /* Brighter rim + an outer hairline so the socket edge separates from
       dark patches of the lobby; inset top-shadow keeps the depth. */
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 3px 7px rgba(0, 0, 0, 0.62),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.4);
}
.blh__slot-icon {
    width: 58%;
    height: 58%;
    color: #dcf0f7;
    opacity: 0.36;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.65));
    transition: opacity var(--dur-xs) var(--ease-out), color var(--dur-xs) var(--ease-out);
}
.blh__slot-icon svg { width: 100%; height: 100%; display: block; }

/* Filled socket = item seated proud in the well: cyan ring + glow. */
.blh__slot.is-filled .blh__slot-frame {
    border-color: var(--acc-cyan);
    box-shadow:
        var(--glow-cyan-md),
        0 0 0 1px rgba(6, 182, 212, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* Hover (last → wins): light the socket, lift it, brighten the ghost. */
.blh__slot:hover .blh__slot-frame {
    border-color: var(--acc-cyan);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(12, 16, 22, 0.52);
    box-shadow: var(--glow-cyan-sm), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
.blh__slot:hover .blh__slot-icon { opacity: 0.6; color: var(--acc-cyan); }

/* ── Hover tooltip ──────────────────────────────────────────────── */
.blh__tip {
    position: absolute;
    z-index: 7;
    top: 50%;
    white-space: nowrap;
    padding: 5px 9px;
    background: rgba(8, 11, 16, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-2);
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.14), 0 6px 18px rgba(0, 0, 0, 0.55);
    color: var(--ink-0);
    font-family: var(--font-mono);
    font-size: var(--fs-mono-sm);
    letter-spacing: var(--ls-chip);
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-xs) var(--ease-out), transform var(--dur-xs) var(--ease-out);
}
.blh__slot:hover .blh__tip { opacity: 1; }

/* Point the tip into open space: left column → right of the socket,
   right column → left of it, weapon row → above. */
.blh__col--left  .blh__tip { left: calc(100% + 8px); transform: translateY(-50%) translateX(-4px); }
.blh__col--right .blh__tip { right: calc(100% + 8px); transform: translateY(-50%) translateX(4px); }
.blh__col--left  .blh__slot:hover .blh__tip,
.blh__col--right .blh__slot:hover .blh__tip { transform: translateY(-50%) translateX(0); }
.blh__row--bottom .blh__tip {
    top: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}
.blh__row--bottom .blh__slot:hover .blh__tip { transform: translateX(-50%) translateY(0); }

/* ── Slot popup: empty bag grid + "Coming Soon" stamp ───────────────
   Inventory isn't live, so each body-slot eq-slot popover shows an empty
   slotted "bag" (like a fresh WoW bag) with a centered Coming Soon stamp.
   Hide the (empty) loadout strip + let the custom body fill the popover
   so the content centers vertically. */
.eq-slot[data-part-id^="body-"] .eq-slot__loadout { display: none; }
.eq-slot[data-part-id^="body-"] .eq-slot__custom {
    flex: 1;
    display: flex;
    padding: 12px;
}

.blh-soon {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* The empty bag: a grid of recessed, item-less slots filling the body. */
.blh-soon__grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 6px;
}
.blh-soon__cell {
    border-radius: var(--r-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.24) 100%),
        rgba(12, 16, 22, 0.4);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.55),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}
/* Stamp + note centered over the bag. */
.blh-soon__center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.blh-soon__stamp {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transform: rotate(-8deg);
    padding: 12px 26px 13px;
    border: 2px solid #ff8000;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.16), rgba(255, 184, 77, 0.10));
    color: #ff8000;
    text-shadow: 0 0 8px rgba(255, 128, 0, 0.4);
    box-shadow: 0 0 22px rgba(255, 128, 0, 0.22), inset 0 0 14px rgba(255, 128, 0, 0.12);
}
/* Inner hairline = the double-ring rubber-stamp edge. */
.blh-soon__stamp::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 128, 0, 0.55);
    border-radius: 5px;
    pointer-events: none;
}
.blh-soon__stamp-top {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0.92;
}
.blh-soon__stamp-main {
    font-family: var(--font-mono);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
}
.blh-soon__note {
    margin: 0;
    max-width: 230px;
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: var(--fs-mono-sm);
    letter-spacing: var(--ls-chip);
    text-transform: uppercase;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ── Responsive: tighten on small viewports ─────────────────────── */
@media (max-width: 768px) {
    .blh__col { gap: 7px; width: 54px; }
    .blh__slot-frame { width: 54px; height: 54px; }
    .blh__emoji { font-size: 30px; }
}
@media (max-width: 640px) {
    .blh__slot-frame { width: 48px; height: 48px; }
    .blh__emoji { font-size: 26px; }
    .blh__col { gap: 6px; top: 44px; width: 48px; }
    .blh__col--left  { transform: translateX(-6px); }
    .blh__col--right { transform: translateX(6px); }
    .blh.is-active .blh__col--left  { transform: translateX(0); }
    .blh.is-active .blh__col--right { transform: translateX(0); }
}
