/* ============================================================
   Tool Styles — Antenna Length Calculator v2.1
   File: /assets/css/modules/electronics/antenna.v2.1.css
   Purpose:
   - Tool-only layout + KPI styling + presets row + work formatting
   - Mobile-first, 44x44 touch targets, clamp typography
   - NO changes to ub-toolkit.v2.1.css
   ============================================================ */

/* ==============================
   Local tokens (tool-scoped)
   ============================== */
:root{
  --ant-radius: 16px;
  --ant-gap: 14px;
  --ant-soft: rgba(0,0,0,.06);
}

/* ==============================
   Tool hero layout
   ============================== */
.ub-hero{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--ant-gap);
}

/* Stack on tablet/mobile */
@media (max-width: 980px){
  .ub-hero{ grid-template-columns: 1fr; }
}

/* ==============================
   Summary head + KPIs
   ============================== */
.ub-hero-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
}

.ub-hero-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}

.ub-hero-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* KPI tiles (tool-scoped; matches UB look) */
.ub-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}

.ub-kpi{
  min-width: 150px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}

.ub-kpi .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}

.ub-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 14px;
  margin-top: 2px;
}

/* ==============================
   Presets row
   ============================== */
.ub-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.ub-preset-row .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* Subtle “preset card” polish (only affects the tight preset card) */
.ub-card.ub-card--tight[aria-label="Presets"]{
  background: linear-gradient(180deg, var(--ub-card-bg), var(--ub-surface-2));
}

/* ==============================
   Outputs + secondary units
   ============================== */
.ub-out .ub-note{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ub-muted);
  font-family: var(--ub-mono);
}

/* Keep output values from overflowing on narrow screens */
.ub-out .ub-v{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* ==============================
   Work area formatting
   ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* ==============================
   Inputs — keep clean (tool polish)
   Note: ub-toolkit already forces stacked input+select globally.
   ============================== */
.ub-field .ub-inputrow > select{
  margin-top: 6px;
}

/* Touch target consistency */
.ub-field input,
.ub-field select{
  min-height: 44px;
}

/* Slightly tighter helper spacing */
.ub-field .hint{
  margin-top: 6px;
}

/* ==============================
   Details focus ring improvement
   ============================== */
.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 helper (tool-only)
   ============================== */
.ub-btn--block{
  width: 100%;
}

/* ==============================
   Small screens polish
   ============================== */
@media (max-width: 520px){
  .ub-kpi{ min-width: 130px; }
  .ub-out-grid{ gap: 10px; }
}
