/* ============================================================
 * Utilities Bunker — dB Calculator (v2.1)
 * File: /assets/css/modules/electronics/db-calc.v2.1.css
 * Purpose:
 * - Tool-only layout + mode chips + work formatting
 * - Mobile-first, 44x44 touch targets, clamp typography
 * - No changes to ub-toolkit.v2.1.css
 * ============================================================ */

/* ============================== Tool tokens (scoped) ============================== */
:root{
  --db-radius: 16px;
  --db-gap: 14px;
}

/* ============================== Header row ============================== */
.ub-headrow{
  display:flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.ub-title-h1{
  margin:0;
  font-size: var(--ub-fs-5);
}

/* ============================== Tool section helpers ============================== */
.ub-steps{
  margin:0;
  padding-left: 18px;
}
.ub-steps li{
  margin: 0 0 6px;
}

/* ============================== Mode bar ============================== */
.ub-modebar{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

/* Make chips comfortably tappable */
.ub-modebar .ub-chip{
  min-height: var(--ub-hit);
  padding: 10px 14px;
}

/* Provide a clear active style (even if toolkit also styles aria-pressed) */
.ub-modebar .ub-chip[aria-pressed="true"]{
  border-color: rgba(249,58,19,.55);
  box-shadow: 0 0 0 4px rgba(249,58,19,.12);
}

/* ============================== Form spacing ============================== */
.ub-form{
  margin: 0;
}

/* Optional: ensure grid spacing feels consistent */
.ub-grid{
  gap: var(--db-gap);
}

/* Separator line inside the tool card */
.ub-hr{
  border: none;
  border-top: 1px solid var(--ub-border);
  margin: 14px 0;
}

/* ============================== Actions row ============================== */
.ub-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* checkbox chip alignment */
.ub-chip--check{
  display:inline-flex;
  gap: 8px;
  align-items: center;
}

/* ============================== Show Work formatting ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Improve summary tap target and focus ring */
.ub-collapsible summary{
  cursor: pointer;
  font-weight: 950;
  min-height: var(--ub-hit);
  display:flex;
  align-items:center;
}
.ub-collapsible summary:focus{
  outline:none;
  box-shadow: 0 0 0 4px var(--ub-focus);
  border-radius: 12px;
}

/* ============================== FAQ ============================== */
.ub-faq-q{
  margin: 12px 0 6px;
  font-size: var(--ub-fs-2);
  font-weight: 950;
}
.ub-faq-a{
  margin: 0 0 10px;
  color: var(--ub-text);
}

/* ============================== Bullet list styling ============================== */
.ub-bullets{
  margin: 0;
  padding-left: 18px;
}
.ub-bullets li{
  margin: 0 0 6px;
}
.ub-bullets code{
  font-family: var(--ub-mono);
}

/* ============================== Rail full-width buttons helper ============================== */
.ub-btn--block{
  width: 100%;
}

/* ============================== Small screens polish ============================== */
@media (max-width: 520px){
  .ub-modebar{
    gap: 8px;
  }
  .ub-modebar .ub-chip{
    width: 100%;
    justify-content: center;
  }
}
