/* The Steam overlay's parts (overlay.html, overlay-hud.js; 2026-11-28, the owner's "steam overlay overhaul"): the
   overlay app 0.8.0's parts for a pinned Steam overlay browser window. Steam shows a pinned window at 50-100% opacity
   and passes clicks through to the game, so the parts are drawn to be read at a glance, dark and high in contrast, with
   nothing that needs a hover. overlay.css keeps the map's own pieces (its bar, the popup). */
.hud-page { --hud-bg: #0b0f0d; --hud-panel: rgba(18, 25, 21, 0.92); --hud-line: rgba(255, 255, 255, 0.14);
  --hud-text: #eef3ee; --hud-muted: #a6b3a9; --hud-amber: #ffb340; --hud-good: #30d158; --hud-warn: #ff9f0a; --hud-bad: #ff453a;
  --hud-water: #64d2ff; background: var(--hud-bg); }
.hud { position: fixed; inset: 0; display: flex; flex-direction: column; color: var(--hud-text); font-size: 13px; }
.hud[data-size="s"] { font-size: 12px; }
.hud[data-size="l"] { font-size: 15px; }

/* the slim head: whether you're found, and ⚙ (clickable while the Steam overlay is open) */
.hud-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 22px; padding: 2px 4px 2px 8px; }
.hud-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hud-muted); }
.hud-dot.is-live { background: var(--hud-good); box-shadow: 0 0 6px rgba(48, 209, 88, 0.7); }
.hud-dot.is-down { background: var(--hud-bad); }
.hud-state { flex: 1 1 auto; min-width: 0; font-size: 0.85em; font-weight: 600; color: var(--hud-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-gear, .hud-x { flex: none; font: inherit; line-height: 1; color: var(--hud-muted); background: transparent;
  border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.hud-gear:hover, .hud-gear:focus-visible, .hud-x:hover, .hud-x:focus-visible { color: var(--hud-text); border-color: var(--hud-line);
  outline: none; }

/* the parts: a column under the map (stack), the map on the left (side), or the parts alone (nomap) */
.hud-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 4px 4px; overflow: hidden; }
.hud-panel { flex: none; position: relative; background: var(--hud-panel); border: 1px solid var(--hud-line);
  border-radius: 8px; padding: 5px 8px 6px; }
.hud-panel[hidden] { display: none !important; }
.hud-map { flex: 1 0 140px; min-height: 140px; padding: 0; overflow: hidden; }
/* the map's buttons only under the mouse: the Steam overlay open (a pinned window takes no clicks anyway) */
.hud .ov-bar { opacity: 0; transition: opacity 0.2s; }
.hud .hud-map:hover .ov-bar, .hud .hud-map:focus-within .ov-bar { opacity: 1; }
.hud .ov { position: absolute; inset: 0; } /* overlay.css fills the window with it; here it fills its part */
.hud .ov-info, .hud .ov-prime { display: none !important; } /* the old info lines: the parts show them now */
.hud-body[data-layout="side"] { display: grid; grid-template-columns: minmax(0, 3fr) minmax(150px, 2fr);
  grid-auto-rows: min-content; align-content: start; overflow-y: auto; }
.hud-body[data-layout="side"] .hud-map { grid-column: 1; grid-row: 1 / span 9; align-self: stretch; height: 100%; min-height: 160px; }
.hud-body[data-layout="side"] .hud-panel:not(.hud-map) { grid-column: 2; }
.hud-body[data-layout="nomap"] { overflow-y: auto; }
.hud-body[data-layout="stack"] { overflow-y: auto; } /* past what fits: scrolls with the Steam overlay open */
.hud-only .hud-head { display: none; } /* one part in its own window: just the part (⚙ on a hover-free corner below) */
.hud-only .hud-body { padding-top: 4px; }

.hud-h { display: flex; align-items: baseline; gap: 5px; margin: 0 0 4px; font-size: 0.92em; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-h .hud-sub { font-weight: 600; color: var(--hud-muted); }
.hud-line { margin: 2px 0 0; color: var(--hud-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-list { margin: 0; padding: 0; list-style: none; }
.hud-list li { margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* stats: one bar a vital, its share at the end */
.hud-bars { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 6px; }
.hud-bars .k { font-size: 0.86em; color: var(--hud-muted); }
.hud-bars .v { font-size: 0.86em; font-variant-numeric: tabular-nums; text-align: right; min-width: 3ch; }
.hud-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hud-bar > i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--c, var(--hud-good)); transition: width 0.4s ease; }
.hud-bar.is-low > i { animation: hud-pulse 1.2s ease-in-out infinite; }
.hud-bleed { color: var(--hud-bad); font-weight: 600; }
@keyframes hud-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .hud-bar > i { transition: none; } .hud-bar.is-low > i { animation: none; } }

/* prime: the conditions, done ones in green */
.hud-list .is-done { color: var(--hud-good); }
.hud-list .is-todo { color: var(--hud-muted); }
.hud-list .is-note { color: var(--hud-amber); }
.hud-prime-done .hud-h { margin: 0; color: var(--hud-amber); }

/* where you are */
.hud-water { color: var(--hud-water); }
.hud-guide { color: var(--hud-amber); }
.hud-coords { font-size: 0.82em; font-variant-numeric: tabular-nums; }

/* bounties */
.hud-onme { color: var(--hud-bad); font-weight: 700; }
.hud-wanted li { color: var(--hud-text); }
.hud-wanted .amt { color: var(--hud-amber); font-variant-numeric: tabular-nums; }
.hud-wanted .seen { color: var(--hud-muted); }

/* notifications: over the top of the parts, the newest on top, each for a few seconds */
.hud-notes { position: absolute; top: 26px; left: 6px; right: 6px; z-index: 5; display: flex; flex-direction: column; gap: 4px;
  pointer-events: none; }
.hud-only .hud-notes { top: 6px; }
/* one line each, along the top: the minimap's middle (your own arrow) stays in sight */
.hud-note { display: flex; align-items: baseline; gap: 6px; min-width: 0; background: rgba(10, 14, 12, 0.96); border: 1px solid var(--hud-line);
  border-left: 4px solid var(--hud-amber); border-radius: 7px; padding: 3px 9px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  white-space: nowrap; overflow: hidden; animation: hud-in 0.25s ease-out; }
.hud-note b { flex: none; font-size: 0.92em; }
.hud-note span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.86em; color: var(--hud-muted); }
.hud-note.is-done { border-left-color: var(--hud-good); }
.hud-note.is-warn { border-left-color: var(--hud-bad); }
@keyframes hud-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hud-note { animation: none; } }

/* ⚙ settings: over everything, only while the Steam overlay is open (it's the only time a pinned page takes clicks) */
.hud-set { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; background: #080b09; }
.hud-set[hidden] { display: none; }
.hud-set-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--hud-line); }
.hud-set-head h2 { flex: 1 1 auto; margin: 0; font-size: 1em; }
.hud-set-body { flex: 1 1 auto; overflow-y: auto; padding: 6px 10px 12px; }
.hud-set h3 { margin: 10px 0 4px; font-size: 0.9em; color: var(--hud-amber); }
.hud-set p, .hud-set li { color: var(--hud-muted); font-size: 0.88em; }
.hud-set ol { margin: 0; padding-left: 18px; }
.hud-set a { color: var(--hud-amber); }
.hud-rows { margin: 0; padding: 0; list-style: none; }
.hud-rows li { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: var(--hud-text); font-size: 0.92em; }
.hud-rows label { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.hud-rows button, .hud-choice button { font: inherit; font-size: 0.85em; color: var(--hud-text); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hud-line); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.hud-rows button:disabled { opacity: 0.35; cursor: default; }
.hud-choice { display: flex; flex-wrap: wrap; gap: 4px; }
.hud-choice button[aria-pressed="true"] { border-color: var(--hud-amber); background: rgba(255, 179, 64, 0.16); color: #ffe2b0; font-weight: 700; }
.hud-links { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hud-saved { min-height: 1.2em; margin: 8px 0 0; font-size: 0.82em; color: var(--hud-good) !important; }
