/* Embedded visibility (sniper / recon line-of-sight) calculator —
   /wardogs/visibility-calculator. Built on the mortar embed's chrome
   (mortar-embed.css, prefix `mc-`); everything specific to this tool is
   prefixed `vc-`. */

/* ---- 2D / 3D switch in the top bar -------------------------------------- */
.vc-mode {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  background: var(--bg-1);
}
.vc-mode button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.vc-mode button:hover { color: var(--text-0); }
.vc-mode button.is-active { background: var(--amber); color: #0b0e10; }
.vc-mode button:disabled { opacity: 0.4; cursor: default; }
.vc-mode button[hidden] { display: none; }

/* ---- panel rows ---------------------------------------------------------- */
.vc-sliders { display: grid; gap: 8px; }
.vc-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.vc-slider input[type="range"] { width: 100%; min-width: 0; margin: 0; accent-color: var(--amber); }
.vc-slider output {
  text-align: right;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0.02em;
}

.mc-controls input[type="number"] {
  width: 100%;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-0);
  font: 600 0.92rem var(--font-body);
}
.mc-controls label.vc-custom { grid-column: 1 / -1; }
.mc-controls label[hidden] { display: none; }

/* ---- readouts: the main tile is the verdict (VISIBLE / BLOCKED) ---------- */
.mc-ro-main.vc-verdict { border-color: var(--line-strong); background: var(--bg-2); }
.mc-ro-main.vc-verdict .mc-ro-label { color: var(--text-2); }
.mc-ro-main.vc-verdict .mc-ro-val { color: var(--text-2); font-size: 2rem; letter-spacing: 0.08em; }
.mc-ro-main.vc-verdict.is-ok { border-color: var(--olive, #8bc34a); background: rgba(139, 195, 74, 0.12); }
.mc-ro-main.vc-verdict.is-ok .mc-ro-val { color: #9ef0a8; }
.mc-ro-main.vc-verdict.is-ok .mc-ro-label { color: #9ef0a8; }
.mc-ro-main.vc-verdict.is-bad { border-color: var(--red); background: var(--red-dim); }
.mc-ro-main.vc-verdict.is-bad .mc-ro-val { color: #ff7a7a; }
.mc-ro-main.vc-verdict.is-bad .mc-ro-label { color: #ff7a7a; }
.mc-ro-main.vc-verdict.is-cov .mc-ro-val { color: var(--amber-hi); font-size: 2.4rem; letter-spacing: 0; }
.mc-ro-main.vc-verdict.is-cov { border-color: var(--amber); background: var(--amber-dim); }
.mc-ro-main.vc-verdict.is-cov .mc-ro-label { color: var(--amber); }

/* legend swatches in the foot / hint */
.vc-sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
  border-radius: 2px;
}
.vc-sw-vis { background: #69f0ae; }
.vc-sw-hid { background: #05070a; border: 1px solid #444; }

/* the observer / target step buttons reuse .mc-step; glyphs */
.mc-glyph-obs {
  border-radius: 50%;
  border: 2px solid #69f0ae;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(105, 240, 174, 0.25);
}
.mc-glyph-tgt::before, .mc-glyph-tgt::after { background: #ff7a7a; }
.mc-step.is-set .mc-glyph-tgt::before, .mc-step.is-set .mc-glyph-tgt::after { background: var(--amber); }

@media (max-width: 760px) {
  .vc-mode button { min-width: 38px; padding: 0 8px; font-size: 0.82rem; }
  .vc-sliders { order: 1; }
  .mc-map .mc-readouts { grid-template-columns: 1.2fr 1fr 1fr; }
  .mc-map .mc-ro-main.vc-verdict .mc-ro-val { font-size: 1.3rem; }
  .mc-map .mc-ro-main.vc-verdict.is-cov .mc-ro-val { font-size: 1.6rem; }
}

/* phone top bar: the 2D/3D switch joins map tabs + style + fullscreen on one row */
@media (max-width: 760px) {
  .mc-bar { gap: 6px; }
  .mc-maps a { padding: 0 8px; font-size: 0.82rem; letter-spacing: 0.08em; }
  .mc-bar-actions { flex: 1; min-width: 0; justify-content: flex-end; gap: 6px; }
  .mc-style { flex: 0 1 auto; min-width: 0; }
  .mc-style select { max-width: 100px; min-width: 0; }
}

/* step buttons: glyph + name on one line, the state ("placed", "tap map") underneath,
   so "Target placed" never pushes past the panel width */
.mc-steps .mc-step {
  flex-wrap: wrap;
  row-gap: 2px;
  padding: 6px 8px;
}
.mc-steps .mc-step .mc-step-state {
  flex-basis: 100%;
  text-align: center;
  line-height: 1.1;
}
.mc-steps .mc-step .mc-step-state:empty { display: none; }
