/* ============================================================
   Tool Styles — Currency Calculator (Live Rates) v2.1
   File: /assets/css/modules/calculators/financialcalculators/currency-calculator.v2.1.css
   Purpose:
   - Tool-only layout + conversion KPI tiles + work formatting
   - No changes to ub-toolkit.v2.1.css required
   - Mobile-first, 44x44 touch targets, clamp typography
   ============================================================ */

/* Local tokens (tool-scoped) */
:root{
  --cc-radius: 16px;
  --cc-gap: 14px;
}

/* Tool hero layout */
.ub-hero{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--cc-gap);
}

/* Stack on tablet/mobile */
@media (max-width: 980px){
  .ub-hero{ grid-template-columns: 1fr; }
}

/* Live head */
.ub-livehead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.ub-live-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}
.ub-live-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
  max-width: 62ch;
}

/* Status badges */
.ub-live-badges{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}
.ub-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ub-border);
  background: var(--ub-surface-2);
  color: var(--ub-text);
  font-size: 12px;
  font-weight: 950;
}

/* KPI tiles */
.ub-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 6px;
}
.ub-kpi{
  flex: 1 1 140px;
  min-width: 140px;
  padding: 10px 12px;
  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: 3px;
  overflow-wrap:anywhere;
}

/* Work area */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Buttons block helper (tool-only: adds width without touching toolkit) */
.ub-btn--block{ width: 100%; }

/* Improve button row spacing on small screens */
@media (max-width: 520px){
  .ub-kpi{ min-width: 120px; }
}

/* Input micro polish: ensure selects feel consistent */
.ub-field select{
  appearance: auto;
}

/* Ensure rail action buttons look uniform (some tools rely on this) */
.ub-rail-actions .ub-btn{
  width: 100%;
  margin-bottom: 10px;
}

/* Subtle emphasis for code inside tool sections */
.ub-card code{
  font-family: var(--ub-mono);
  font-size: 0.95em;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid var(--ub-border);
  background: var(--ub-surface-2);
}

/* Make details summary hit target feel crisp */
.ub-collapsible > summary{
  min-height: 44px;
}