/* ============================================================
   Tool Styles — Depreciation Calculator v2.1
   File: /assets/css/modules/calculators/financialcalculators/depreciation-calculator.v2.1.css
   Purpose:
   - Tool-only layout + results panel + schedule table tweaks + work formatting
   - No changes to ub-toolkit.v2.1.css required
   - Mobile-first, 44x44 touch targets, clamp typography
   ============================================================ */

/* Local tokens (tool-scoped) */
:root{
  --dep-radius: 16px;
  --dep-gap: 14px;
}

/* Tool hero layout */
.ub-hero{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--dep-gap);
}

/* Stack on tablet/mobile */
@media (max-width: 980px){
  .ub-hero{ grid-template-columns: 1fr; }
}

/* Results panel (lab) */
.ub-lab{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--dep-radius);
  padding: 12px;
}

.ub-lab-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 8px;
}

.ub-lab-title{
  font-size: clamp(13px, 1.2vw, 14px);
  font-weight: 950;
  letter-spacing: .01em;
}

.ub-lab-sub{
  font-size: 12px;
  color: var(--ub-muted);
  margin-top: 2px;
}

/* KPI tiles (reuse toolkit look, tighten for finance) */
.ub-kpis{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  justify-content:flex-end;
}

.ub-kpi{
  min-width: 132px;
  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;
}

/* Work area */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* Table wrapper polish (keeps horizontal scroll usable) */
.ub-tablewrap{
  border-radius: var(--ub-radius-2);
}

/* Slightly tighter table rows for schedules */
.ub-table th,
.ub-table td{
  white-space: nowrap;
}

/* Make first column a little narrower */
.ub-table th:first-child,
.ub-table td:first-child{
  width: 1%;
}

/* Improve tap targets for buttons in schedule actions */
#btnDownloadCsv,
#btnCopySchedule{
  min-height: 44px;
}

/* Details summary tweaks for better affordance */
.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 helper (safe even if toolkit defines it) */
.ub-btn--block{ width: 100%; }

/* Small screens */
@media (max-width: 520px){
  .ub-kpi{ min-width: 118px; }
  .ub-table th,
  .ub-table td{ padding: 10px 10px; }
}