/* Heimdall stats graph — mockup only. Do not deploy from this folder. */

/* MOCKUP badge sits above the overlay so reviewers always see it */
.hdg-mock-badge{
  position:fixed;z-index:2147483600;top:8px;left:50%;transform:translateX(-50%);
  pointer-events:none;
  font:800 10px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.12em;text-transform:uppercase;
  color:#111;background:linear-gradient(180deg,#FFE14D,#FFC62F);
  border:1px solid rgba(0,0,0,.25);border-radius:999px;
  padding:6px 12px;box-shadow:0 4px 14px rgba(0,0,0,.35);
  white-space:nowrap;
}
@media (max-width:700px){
  .hdg-mock-badge{display:none}
}
#heimdall .hdg-inhead{display:none}
#heimdall.hd-port .hdg-inhead,
#heimdall.hd-land .hdg-inhead{
  display:block;flex:0 0 20px;height:20px;line-height:20px;
  text-align:center;border-radius:0;padding:0;margin:0;
  font:800 9px/20px system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.12em;text-transform:uppercase;
  color:#111;background:linear-gradient(180deg,#FFE14D,#FFC62F);
  border-bottom:1px solid rgba(0,0,0,.2);
  white-space:nowrap;
}


/* Split: graph + scrolling stats */
#heimdall .hd-main{
  flex:1;min-height:0;min-width:0;
  display:flex;flex-direction:column;overflow:hidden;
}
#heimdall .hd-graph-slot{
  flex:0 0 auto;min-width:0;min-height:0;
  padding:6px 8px 4px;
}
#heimdall .hd-sbody{flex:1;min-height:0}

/* Phone / landscape: compact graph pinned at the top of the expanded panel only */
#heimdall.hd-port .hd-graph-slot,
#heimdall.hd-land .hd-graph-slot{padding:6px 8px 2px}
#heimdall.hd-port .hdg-plot svg,
#heimdall.hd-land .hdg-plot svg{height:108px}
#heimdall.hd-port .hdg-bubbles button,
#heimdall.hd-land .hdg-bubbles button{padding:5px 8px;font-size:9px}

/* Desktop: graph sits beside the stats in the dock, using the spare width */
#heimdall.hd-desk.stats-open .hd-stage{
  grid-template-rows:minmax(0,1fr) min(460px,52vh);
}
#heimdall.hd-desk .hd-main{
  display:grid;
  grid-template-columns:minmax(300px,1.12fr) minmax(280px,1fr);
  gap:4px 10px;
  align-items:stretch;
  min-height:0;
}
#heimdall.hd-desk .hd-graph-slot{
  padding:6px 4px 8px 10px;
  display:flex;flex-direction:column;min-height:0;
}
#heimdall.hd-desk .hdg-panel{flex:1;min-height:0;display:flex;flex-direction:column}
#heimdall.hd-desk .hdg-plot{flex:1;min-height:0;display:flex;flex-direction:column}
#heimdall.hd-desk .hdg-plot svg{flex:1;height:auto;min-height:168px}
#heimdall.hd-desk .hdg-bubbles button{padding:6px 10px;font-size:10.5px}

/* Optional stack variant: graph full-width above the stats columns */
#heimdall.hd-desk.hdg-stack .hd-main{
  grid-template-columns:1fr;
  grid-template-rows:auto minmax(0,1fr);
}
#heimdall.hd-desk.hdg-stack .hd-graph-slot{padding:6px 14px 2px}
#heimdall.hd-desk.hdg-stack .hdg-plot svg{flex:none;height:148px;min-height:0}

.hdg-panel{
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.1);
  border-radius:10px;
  overflow:hidden;
  min-width:0;
}
.hdg-panel.is-wait{display:flex;align-items:center;justify-content:center;min-height:88px}

.hdg-bubblerow{position:relative}
.hdg-bubbles{
  display:flex;align-items:center;gap:4px;
  padding:8px 10px 4px;overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
  cursor:grab;touch-action:pan-x;scroll-behavior:smooth;
}
.hdg-bubbles.is-dragging{cursor:grabbing;scroll-behavior:auto}
.hdg-bubbles::-webkit-scrollbar{display:none}
.hdg-bubbles button{
  appearance:none;flex:0 0 auto;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);color:rgba(255,255,255,.72);
  font:700 10px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.03em;text-transform:uppercase;
  padding:6px 8px;border-radius:999px;cursor:pointer;white-space:nowrap;
}
.hdg-bubbles button:focus-visible{outline:2px solid #FFC62F;outline-offset:1px}
.hdg-bubbles button.on{
  background:#4F2683;color:#fff;border-color:rgba(255,198,47,.55);
  box-shadow:0 0 0 1px rgba(255,198,47,.35);
}

.hdg-fade{
  position:absolute;top:4px;bottom:2px;width:56px;pointer-events:none;z-index:2;
  opacity:0;transition:opacity .2s ease;
}
.hdg-fade.r{
  right:0;
  background:linear-gradient(90deg,rgba(12,10,18,0),rgba(12,10,18,.8) 40%,#0c0a12);
}
.hdg-fade.l{
  left:0;
  background:linear-gradient(270deg,rgba(12,10,18,0),rgba(12,10,18,.8) 40%,#0c0a12);
}
.hdg-bubblerow.can-right .hdg-fade.r,
.hdg-bubblerow.can-left .hdg-fade.l{opacity:1}
.hdg-more{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  z-index:3;pointer-events:none;opacity:0;
  font:800 16px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:#FFC62F;text-shadow:0 0 8px #0c0a12,0 0 2px #0c0a12;
  transition:opacity .2s ease;
}
.hdg-bubblerow.can-right .hdg-more{opacity:1}

.hdg-hint{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  z-index:3;pointer-events:none;
  font:700 9px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.04em;text-transform:uppercase;
  color:#111;background:linear-gradient(180deg,#FFD45A,#FFC62F);
  border-radius:999px;padding:5px 8px;
  box-shadow:0 4px 12px rgba(0,0,0,.35);
  white-space:nowrap;opacity:1;transition:opacity .35s ease;
}
.hdg-hint[hidden]{display:none!important}
.hdg-hint.is-out{opacity:0}
.hdg-hint.nudge{animation:hdg-nudge 1.1s ease-in-out 1 .4s}
@keyframes hdg-nudge{
  0%,100%{transform:translateY(-50%)}
  40%{transform:translateY(-50%) translateX(-6px)}
  70%{transform:translateY(-50%) translateX(2px)}
}

.hdg-ghead{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:2px 10px 0;min-height:22px;
}
.hdg-gtitle{
  font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:rgba(255,255,255,.55);white-space:nowrap;
}
.hdg-legend{
  display:flex;gap:10px;background:rgba(11,10,16,.55);
  border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:3px 8px;flex:0 0 auto;
}
.hdg-legend span{
  display:inline-flex;align-items:center;gap:5px;
  font-size:10px;font-weight:700;letter-spacing:.02em;font-variant-numeric:tabular-nums;color:#fff;
}
.hdg-legend em{font-style:normal;font-weight:700}
.hdg-legend i{width:10px;height:3px;border-radius:2px;display:block}
.hdg-legend .a i{background:var(--hdg-a,#C9B3E6);box-shadow:0 0 6px color-mix(in srgb,var(--hdg-a,#C9B3E6) 60%,transparent)}
.hdg-legend .b i{background:var(--hdg-b,#FFB612);box-shadow:0 0 6px color-mix(in srgb,var(--hdg-b,#FFB612) 50%,transparent)}
.hdg-panel.single .hdg-legend .b{display:none}

.hdg-plot{position:relative;padding:0 8px 0 28px}
.hdg-plot svg{display:block;width:100%;height:118px}
.hdg-ylabels{
  position:absolute;left:0;top:0;bottom:16px;width:28px;pointer-events:none;
}
.hdg-ylabels span{
  position:absolute;right:4px;transform:translateY(-50%);
  font-size:8px;font-weight:600;color:rgba(255,255,255,.4);
  letter-spacing:.02em;font-variant-numeric:tabular-nums;white-space:nowrap;
}
.hdg-ylabels .hdg-midlab{color:rgba(255,255,255,.55);font-weight:700}
.hdg-qlabels{
  position:relative;
  height:16px;
  font-size:8px;font-weight:700;letter-spacing:.04em;
  color:rgba(255,255,255,.5);
}
.hdg-qlabels span{
  position:absolute;
  bottom:0;
  transform:translateX(-50%);
  white-space:nowrap;
  text-align:center;
}
.hdg-qlabels span.hdg-now{
  color:rgba(255,255,255,.78);
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  transform:translateX(-100%);
}

.hdg-empty{
  display:none;align-items:center;justify-content:center;
  min-height:88px;margin:4px 10px 10px;border:1px dashed rgba(255,255,255,.16);
  border-radius:10px;color:rgba(255,255,255,.62);
  font:700 11px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.04em;text-transform:uppercase;
}
.hdg-panel.is-empty .hdg-plot,
.hdg-panel.is-empty .hdg-ghead{display:none}
.hdg-panel.is-empty .hdg-empty,
.hdg-panel.is-wait .hdg-empty{display:flex}

@media (prefers-reduced-motion:reduce){
  .hdg-hint.nudge{animation:none}
  .hdg-hint{transition:none}
  .hdg-fade{transition:none}
  .hdg-bubbles{scroll-behavior:auto}
}

/* Stress-test fix 2026-11-22: the swipe hint must not cover stat bubbles.
   While the hint is visible, it sits in its own slot right of the bubble
   scroller (the scroller shrinks) instead of floating over the bubbles.
   When the hint fades out and is hidden, the row returns to full width.
   Browsers without :has() keep the old overlay behavior. */
.hdg-bubblerow:has(> .hdg-hint:not([hidden])){display:flex;align-items:center;gap:6px}
.hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-bubbles{flex:1 1 auto;min-width:0}
.hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-hint{
  position:relative;right:auto;top:auto;transform:none;flex:0 0 auto;margin:4px 8px 0 0;
}
/* heimdall.css resets margin/padding on every #heimdall element; restore them here */
#heimdall .hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-hint{margin:4px 8px 0 0;padding:5px 8px}
.hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-hint.nudge{animation:hdg-nudge-slot 1.1s ease-in-out 1 .4s}
.hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-fade.r,
.hdg-bubblerow:has(> .hdg-hint:not([hidden])) > .hdg-more{opacity:0}
@keyframes hdg-nudge-slot{
  0%,100%{transform:none}
  40%{transform:translateX(-6px)}
  70%{transform:translateX(2px)}
}
