/* ============================================================
   Tool Styles — Credit Card Calculator v2.1
   File: /assets/css/modules/calculators/financialcalculators/credit-card-calculator.v2.1.css
   Purpose:
   - Tool-only layout + payoff summary panel + schedule preview table polish
   - 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;
  --cc-soft: rgba(0,0,0,.06);
}

/* Header row */
.cc-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}
.cc-h1{ margin:0; font-size:var(--ub-fs-5); }
.cc-sub{ margin:6px 0 0; }

/* How-to list */
.cc-steps{ margin:0; padding-left:18px; }
.cc-steps li{ margin:6px 0; }

/* Tool hero layout */
.cc-hero{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--cc-gap);
}
@media (max-width: 980px){
  .cc-hero{ grid-template-columns: 1fr; }
}

/* Summary panel */
.cc-panel{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--cc-radius);
  padding: 12px;
}
.cc-panel-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.cc-panel-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}
.cc-panel-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* KPI tiles */
.cc-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}
.cc-kpi{
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}
.cc-kpi .k{
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}
.cc-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: 14px;
  margin-top: 2px;
}

/* Badges row */
.cc-badges{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 6px;
}
.cc-badge{
  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;
}
.cc-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ub-muted);
}
.cc-dot--ok{ background: var(--ub-success); }
.cc-dot--warn{ background: var(--ub-warning); }
.cc-dot--bad{ background: var(--ub-danger); }

.cc-mode{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.cc-mode .ub-chip{
  min-height: 44px;
  padding: 10px 12px;
}

/* Schedule preview box */
.cc-mini{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,.12);
}
html.ub-theme-dark .cc-mini{ border-top-color: rgba(255,255,255,.16); }

.cc-mini-title{
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ub-muted);
}
.cc-mini-sub{
  margin-top: 4px;
  color: var(--ub-muted);
  font-size: 12px;
}

/* Table wrapper: keyboard scroll region */
.cc-tablewrap{
  margin-top: 10px;
  border-radius: var(--ub-radius-2);
  overflow:auto;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}
.cc-tablewrap:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--ub-focus);
}

.cc-empty{
  color: var(--ub-muted);
  font-size: 13px;
}

/* Inputs form */
.cc-form .ub-grid{ margin-top: 8px; }

/* Divider */
.cc-hr{
  border: none;
  border-top: 1px solid var(--ub-border);
  margin: 14px 0;
}

/* Settings section */
.cc-settings{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.cc-chip{
  display:flex;
  gap: 8px;
  align-items:center;
  width: fit-content;
}
.cc-fee,
.cc-purchases{
  margin-top: 2px;
  padding: 10px;
  border-radius: var(--ub-radius-2);
  border: 1px solid var(--ub-border);
  background: var(--ub-surface-2);
}

/* Actions */
.cc-actions{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

/* Work box */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}
.cc-footnote{
  margin-top:10px;
  color: var(--ub-muted);
  font-size: 12px;
}

/* Reference list */
.cc-ref{ margin:0; padding-left:18px; }
.cc-ref li{ margin:6px 0; }

/* FAQ */
.cc-faq-q{ margin:12px 0 6px; }
.cc-faq-a{ margin:0 0 10px; }

/* Small screens polish */
@media (max-width: 520px){
  .cc-kpi{ min-width: 124px; }
  .cc-panel{ padding: 10px; }
}

/* Reduce motion: respect user preference (tool-only additions) */
@media (prefers-reduced-motion: reduce){
  .cc-mode .ub-chip{ transition: none; }
}