/* ============================================================
   Utilities Bunker — LC Resonant Frequency (v2.1)
   File: /assets/css/modules/electronics/lc-resonance.v2.1.css
   Purpose:
   - Tool-only layout + LC lab visuals + KPI tiles + work formatting
   - NO changes to ub-toolkit.v2.1.css
   - Mobile-first, 44x44 touch targets, clamp typography
   ============================================================ */

/* ============================== Local tokens (tool-scoped) ============================== */
:root{
  --lc-radius: 16px;
  --lc-gap: 14px;
  --lc-soft: rgba(0,0,0,.06);
}

/* ============================== Tool hero layout ============================== */
.ub-lc-hero{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--lc-gap);
}

/* Stack on tablet/mobile */
@media (max-width: 980px){
  .ub-lc-hero{ grid-template-columns: 1fr; }
}

/* ============================== LC Lab panel ============================== */
.ub-lc-lab{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--lc-radius);
  padding: 12px;
}

.ub-lc-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 8px;
}

.ub-lc-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}

.ub-lc-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* ============================== KPI tiles ============================== */
.ub-lc-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}

.ub-lc-kpi{
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}

.ub-lc-kpi .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}

.ub-lc-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 14px;
  margin-top: 2px;
}

/* ============================== Status pill ============================== */
.ub-lc-note-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
  font-size: 12px;
  font-weight: 950;
  min-height: 44px;
}

/* dot uses global .ub-dot if present; fall back if not */
.ub-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ub-muted);
}

/* ============================== Solve wheel chips (tool) ============================== */
.ub-lc-wheel{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 10px;
}

.ub-lc-wheel .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--ub-border);
  background: var(--ub-chip-bg);
  color: var(--ub-chip-text);
  font-weight: 900;
  cursor: pointer;
  user-select:none;
}

.ub-lc-wheel .ub-chip:hover{ background: var(--ub-chip-hover); }

.ub-lc-wheel .ub-chip[aria-pressed="true"]{
  border-color: rgba(249,58,19,.55);
  box-shadow: 0 0 0 4px rgba(249,58,19,.12);
}

/* ============================== LC SVG ============================== */
.ub-lc-svg{
  width: 100%;
  height: auto;
  margin-top: 10px;
  display:block;
  border-radius: 14px;
}

/* Keep stroke contrast in dark mode (subtle improvement) */
html.ub-theme-dark .ub-lc-svg rect{
  stroke: rgba(255,255,255,.12);
  fill: rgba(255,255,255,.03);
}
html.ub-theme-dark .ub-lc-svg path,
html.ub-theme-dark .ub-lc-svg line{
  stroke: rgba(255,255,255,.55);
}
html.ub-theme-dark .ub-lc-svg text{
  fill: rgba(255,255,255,.72);
}

/* ============================== Presets row ============================== */
.ub-lc-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 10px;
}

.ub-lc-preset-row .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* ============================== Inline hint + error (tool-local safety) ============================== */
.hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ub-muted);
}

.ub-inline-error{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ub-danger);
  font-weight: 800;
  min-height: 16px; /* keeps layout stable */
}

/* ============================== Outputs / work area ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Details styling enhancement (tool only) */
.ub-collapsible summary{
  cursor:pointer;
  font-weight: 950;
  min-height: 44px;
  display:flex;
  align-items:center;
}
.ub-collapsible summary:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--ub-focus);
  border-radius: 12px;
}

/* ============================== Rail button block helper ============================== */
.ub-btn--block{ width:100%; }

/* ============================== Small screens polish ============================== */
@media (max-width: 520px){
  .ub-lc-kpi{ min-width: 106px; }
  .ub-lc-wheel{ grid-template-columns: 1fr; }
}
