/* ============================================================
   Tool Styles — Debt Consolidation Calculator v2.1
   File: /assets/css/modules/calculators/financialcalculators/debt-consolidation-calculator.v2.1.css
   Purpose:
   - Tool-only layout + debt table + KPIs + work formatting
   - No changes to ub-toolkit.v2.1.css
   - Mobile-first, 44x44 touch targets, clamp typography
   ============================================================ */

/* Tool-scoped tokens */
:root{
  --dc-radius: 16px;
  --dc-gap: 14px;
  --dc-soft: rgba(0,0,0,.06);
}

/* Header layout */
.dc-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}
.dc-title{ margin:0; font-size:var(--ub-fs-5); }
.dc-sub{ margin:6px 0 0; }

/* How-to list */
.dc-ol{ margin:0; padding-left:18px; }
.dc-note{ margin-top:10px; }

/* Hero layout (debts + side panel) */
.dc-hero{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--dc-gap);
}
@media (max-width: 980px){
  .dc-hero{ grid-template-columns: 1fr; }
}

/* Left panel (debts list container) */
.dc-panel{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--dc-radius);
  padding: 12px;
}
.dc-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.dc-panel-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}
.dc-panel-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* KPIs */
.dc-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}
.dc-kpi{
  min-width: 132px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}
.dc-kpi .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}
.dc-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 14px;
  margin-top: 2px;
}

/* Alerts */
.dc-alert{
  margin: 8px 0 12px;
}

/* Debt "table" grid */
.dc-table{
  display:block;
  border: 1px solid var(--ub-border);
  border-radius: 16px;
  overflow:hidden;
  background: var(--ub-card-bg);
}

/* Header row */
.dc-thead{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr 0.7fr 0.9fr 0.6fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ub-surface-2);
  border-bottom: 1px solid var(--ub-border);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ub-muted);
}

/* Data row */
.dc-row{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr 0.7fr 0.9fr 0.6fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
html.ub-theme-dark .dc-row{
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dc-row:last-child{ border-bottom: 0; }

/* Cells */
.dc-cell{ min-width: 0; }
.dc-label{
  display:none; /* shown in mobile */
  font-size: 12px;
  font-weight: 950;
  color: var(--ub-muted);
  margin-bottom: 6px;
}
.dc-in{
  width: 100%;
  min-height: var(--ub-hit);
  padding: 10px 12px;
  border-radius: var(--ub-radius-1);
  border: 1px solid var(--ub-border);
  background: var(--ub-surface-1);
  color: var(--ub-text);
  font-size: var(--ub-fs-2);
}

/* Money input with $ prefix */
.dc-money{
  display:flex;
  align-items:center;
  gap: 8px;
}
.dc-currency{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 26px;
  height: var(--ub-hit);
  border-radius: 10px;
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  color: var(--ub-muted);
  font-weight: 950;
  font-family: var(--ub-mono);
  user-select:none;
}
.dc-money .dc-in{ flex:1 1 auto; }

/* Row actions */
.dc-actions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
}
.dc-btn{
  min-width: 100%;
  padding: 10px 14px;
  min-height: var(--ub-hit);
}

/* Add/Example buttons */
.dc-row-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

/* Side panel tweaks */
.dc-side{
  margin-bottom: 0; /* it already sits inside hero */
}
.dc-form .ub-grid{ margin-top: 6px; }
.dc-hr{
  border:none;
  border-top: 1px solid var(--ub-border);
  margin: 14px 0;
}

/* Rate mode chips */
.dc-toggles{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.dc-chip{
  display:flex;
  gap: 8px;
  align-items:center;
}

/* Rail key/value */
.dc-rail-kv{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
html.ub-theme-dark .dc-rail-kv{
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dc-rail-kv:last-child{ border-bottom: 0; }
.dc-rail-kv .k{
  font-size: 12px;
  font-weight: 950;
  color: var(--ub-muted);
  letter-spacing: .02em;
}
.dc-rail-kv .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  color: var(--ub-text);
}

/* Work area */
.dc-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Muted helper */
.dc-muted{ color: var(--ub-muted); }

/* Touch target polish */
button, .ub-btn, .ub-chip, input, select{
  touch-action: manipulation;
}

/* Mobile: turn grid rows into stacked cards */
@media (max-width: 860px){
  .dc-thead{ display:none; }

  .dc-row{
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dc-label{ display:block; }
  .dc-actions{ justify-content:flex-start; }
  .dc-btn{ width: 100%; }
}

/* Tiny screens: tighten KPI width */
@media (max-width: 520px){
  .dc-kpi{ min-width: 110px; }
}