/* web/hud/panel_style.css
   One style across the side panels, whose places and titles web/play-panels.css
   lays out: an even row, one empty message, one section heading, one button, and
   one bar drawn three ways by a panel's Bars setting. A panel's colour is its
   --tc. Every size is in em, so it follows the panel's text size. */

/* ---- rows: one height, and numbers in columns that line up --------------- */
.dkbody { font-variant-numeric: tabular-nums; }
.pn-row, .inv-item, .eq-row, .sk-skill, .cs-stat {
  min-height: var(--pn-row); box-sizing: border-box; margin: 0;
}
.pn-row, .inv-item, .sk-skill, .cs-stat { display: flex; align-items: center; }
/* AB's slot row: the label on the left, its value on the right, cut short with
   an ellipsis rather than wrapping. The full value is the hover text. */
.pn-row { gap: .6em; }
.pn-label { flex: none; color: var(--pn-label); }
.pn-value {
  flex: 1; min-width: 0; text-align: right; color: var(--pn-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pn-note { color: var(--pn-faint); }

/* ---- empty: a faint dash for a value, a quiet line for a panel ----------- */
.pn-row.empty .pn-value { color: var(--pn-dash); }
.pn-empty { color: var(--pn-hush); font-style: italic; }
/* A command in it takes the game window's look for a command, underlined. */
.pn-empty .pn-cmd { font-style: normal; text-decoration: underline; text-underline-offset: .2em; }

/* ---- a section heading: small capitals, a hairline to the edge ----------- */
.pn-heading {
  display: flex; align-items: center; gap: .7em; margin: .8em 0 .3em;
  font-size: .79em; letter-spacing: .08em; text-transform: uppercase; color: var(--pn-head);
}
.pn-heading::after { content: ""; flex: 1; height: 1px; background: var(--pn-hair); }
.pn-heading:first-child { margin-top: .2em; }
/* Its words are the button folding what sits under it (web/hud/heading_folds.js),
   behind the Server panel's marker: down while open, right while folded. */
.pn-fold {
  flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; background: none; border: none; border-radius: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; cursor: pointer;
}
.pn-fold::before {
  content: "\25BE"; display: inline-block; width: 1em; font-size: 1.25em; line-height: 1;
  letter-spacing: 0; color: var(--pn-label);
}
.pn-heading.shut .pn-fold::before { content: "\25B8"; }
.pn-fold:hover { color: var(--ink); }
.pn-fold:focus-visible { outline: 2px solid #8fd3ff; outline-offset: 1px; }
.pn-folded { display: none !important; }

/* ---- a button: rounded, outlined in the panel's colour ------------------- */
.pn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .2em .9em; border-radius: 12px; font: inherit; font-size: .9em; font-weight: 600;
  background: transparent; border: 1px solid color-mix(in srgb, var(--tc) 55%, #3a3f4c);
  color: color-mix(in srgb, var(--tc) 70%, #fff);
}
.pn-btn:hover:not(:disabled) { border-color: var(--tc); }
.pn-btn:disabled { border-color: #343949; color: var(--pn-faint); background: transparent; }
.pn-btn svg { width: .95em; height: .95em; flex: none; }
/* The one that confirms a question is filled. */
.pn-btn.go { background: var(--tc); border-color: var(--tc); color: #15171c; }

/* ---- a bar (web/hud/readings.js), by the panel's Bars setting ------------ */
/* Full, the default: a rounded bar, its reading centred inside it in white with
   the bar's hard outline. */
.rd {
  position: relative; display: flex; align-items: center; justify-content: center; gap: .35em;
  height: var(--rd-h); min-width: 0; overflow: hidden; border-radius: 4px; white-space: nowrap;
}
.rd-track { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--rd-track); border-radius: 4px; overflow: hidden; }
.rd .fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 4px; transition: width .3s ease-out; }
.rd.live .fill { transition: none; }
.rd .rd-label, .rd .rd-value, .rd .rd-after {
  position: relative; z-index: 1; font-size: .88em; font-weight: 600; color: #fff;
  text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000;
}
.rd .rd-label:empty, .rd .rd-after:empty { display: none; }
/* Short of room, the words give way and the number never does: the label and
   what follows the value are cut, and in Slim the track narrows, so a charge's
   Skill name, a readied action's name and the bar go before "62%" or "121/159"
   loses a digit. */
.rd .rd-label, .rd .rd-after { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rd .rd-value { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Slim: the label, a thin track, then the value on the right in its bar's tint.
   Numbers: the label and the value alone. A panel sets --rd-label-w and
   --rd-value-w so its columns line up. */
[data-bars="slim"] .rd, [data-bars="numbers"] .rd {
  justify-content: flex-start; height: var(--rd-line); line-height: var(--rd-line); overflow: visible; border-radius: 0;
}
[data-bars="slim"] .rd .rd-label, [data-bars="numbers"] .rd .rd-label {
  display: block; font-size: 1em; font-weight: 400; text-shadow: none; color: var(--pn-label);
}
[data-bars="slim"] .rd .rd-value, [data-bars="numbers"] .rd .rd-value,
[data-bars="slim"] .rd .rd-after, [data-bars="numbers"] .rd .rd-after {
  font-size: 1em; font-weight: 700; text-shadow: none; color: inherit; text-align: right;
}
[data-bars="slim"] .rd .rd-label, [data-bars="slim"] .rd .rd-value { box-sizing: border-box; }
[data-bars="slim"] .rd .rd-label { min-width: var(--rd-label-w, 3em); }
[data-bars="slim"] .rd .rd-label:not(:empty) { padding-right: .6em; }
[data-bars="slim"] .rd .rd-value { min-width: var(--rd-value-w, 4.5em); padding-left: .6em; }
[data-bars="numbers"] .rd .rd-value { flex: 1 0 auto; }
[data-bars="slim"] .rd-track { position: relative; flex: 1 1 1.5em; min-width: 0; height: 6px; border-radius: 3px; }
[data-bars="slim"] .rd .fill { border-radius: 3px; }
[data-bars="numbers"] .rd-track { display: none; }
/* Settings' Target's health shows your target's as a percent or exactly. */
:root[data-target-hp="exact"] .rd.target .percent,
:root:not([data-target-hp="exact"]) .rd.target .exact { display: none; }
