/* =============================================================================
   Leasing calculator (/lizinq) — JobHub-styled.
   Product picker and its published terms on the left, the live monthly payment
   and cost summary on the right, with the annuity schedule below.

   NOTE: the hero chip / panel / block-row / table / explainer rules repeat
   across seven calculator stylesheets now. A shared calculator stylesheet is
   well overdue.
   ============================================================================= */

/* hero formula chip */
.lz-hero-formula {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 24px; padding: 10px 20px; background: rgba(151, 119, 250, 0.10); border-radius: 999px;
}
.lz-hero-formula span { color: var(--hb-muted); font-weight: 600; font-size: 14px; }
.lz-hero-formula code { font-family: "Montserrat", monospace; color: var(--hb-brand); font-weight: 600; font-size: 15px; }

/* ── Input panel ── */
.lz-panel { padding: 30px; }
.lz-panel-title {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 20px;
  color: var(--hb-heading); margin-bottom: 24px;
}

.lz-field { margin-bottom: 22px; }
.lz-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--hb-heading); margin-bottom: 9px;
}
.lz-hint { font-size: 12px; line-height: 1.5; color: var(--hb-muted); margin: 6px 0 0; }

.lz-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hb-border); border-radius: 10px;
  background: var(--hb-surface); color: var(--hb-heading);
  font-family: "Open Sans", sans-serif; font-size: 15px; height: auto;
}
.lz-input:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px rgba(151, 119, 250, 0.15); }
.lz-input::placeholder { color: var(--hb-muted); }

.lz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* product picker */
.lz-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lz-product-btn {
  padding: 14px 10px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); text-align: center; cursor: pointer; transition: all 0.18s ease;
}
.lz-product-btn:hover { border-color: var(--hb-brand); }
.lz-product-btn.is-active {
  border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10);
  box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.20);
}
.lz-product-icon { display: block; font-size: 24px; line-height: 1; margin-bottom: 7px; }
.lz-product-name {
  display: block; font-family: "Montserrat", sans-serif; font-size: 13.5px; font-weight: 600;
  color: var(--hb-heading); margin-bottom: 3px;
}
.lz-product-btn.is-active .lz-product-name { color: var(--hb-brand); }
.lz-product-desc { display: block; font-size: 11px; line-height: 1.4; color: var(--hb-muted); }

/* published terms card */
.lz-conditions {
  padding: 18px; margin-bottom: 24px; border-radius: 14px;
  background: rgba(81, 146, 255, 0.06); border: 1px solid rgba(81, 146, 255, 0.24);
}
.lz-conditions.is-hidden { display: none; }
.lz-conditions h4 {
  font-family: "Montserrat", sans-serif; font-size: 14.5px; font-weight: 700;
  color: var(--hb-heading); margin-bottom: 13px;
}
.lz-conditions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lz-conditions-grid > div {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
  font-size: 12.5px; color: var(--hb-muted);
}
.lz-conditions-grid strong { color: var(--hb-heading); text-align: right; }

.lz-requirements {
  margin: 12px 0 0; padding: 12px 0 0; list-style: none;
  border-top: 1px dashed var(--hb-border);
}
.lz-requirements li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 12px; line-height: 1.6; color: var(--hb-muted);
}
.lz-requirements li + li { margin-top: 4px; }
.lz-requirements strong { color: var(--hb-text); text-align: right; font-weight: 600; }

/* advance pair */
.lz-advance-row { display: flex; gap: 10px; }
.lz-input-wrap { position: relative; flex: 1; }
.lz-input-wrap--pct { flex: 0 0 104px; }
.lz-input-wrap .lz-input { padding-right: 46px; }
/* Narrower field: keep room for the value once the "%" and the spinner are in. */
.lz-input-wrap--pct .lz-input { padding-right: 30px; }
.lz-input-unit {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--hb-muted); pointer-events: none;
}

/* term presets */
.lz-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.lz-preset {
  padding: 6px 13px; border: 1px solid var(--hb-border); border-radius: 8px;
  background: var(--hb-surface); color: var(--hb-muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
}
.lz-preset:hover { border-color: var(--hb-brand); color: var(--hb-heading); }
.lz-preset.is-active { border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10); color: var(--hb-brand); }

/* warnings */
.lz-warnings {
  margin-bottom: 20px; padding: 14px 16px; border-radius: 12px;
  background: rgba(245, 179, 1, 0.10); border: 1px solid rgba(245, 179, 1, 0.34);
}
.lz-warnings[hidden] { display: none; }
.lz-warnings ul { margin: 0; padding-left: 18px; list-style: disc; }
.lz-warnings li { font-size: 13px; line-height: 1.55; color: var(--hb-heading); }
.lz-warnings .lz-hint { margin-top: 8px; }

.lz-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Result column ── */
.lz-result {
  position: sticky; top: 96px;
  padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.lz-result-placeholder { text-align: center; padding: 30px 10px; color: var(--hb-muted); }
.lz-result-icon { font-size: 44px; margin-bottom: 12px; }
.lz-result-placeholder p { font-size: 14px; line-height: 1.6; margin: 0; }

.lz-card { padding: 18px 16px; border-radius: 14px; text-align: center; }
.lz-card-main { background: linear-gradient(135deg, #9777fa, #6d4bd3); color: #fff; }
.lz-card-plain { background: var(--hb-surface); border: 1px solid var(--hb-border); }
.lz-card-amber { background: rgba(245, 179, 1, 0.10); border: 1px solid rgba(245, 179, 1, 0.32); }
.lz-cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.lz-card-label { font-size: 12px; line-height: 1.4; margin: 0 0 6px; opacity: 0.9; }
.lz-card-plain .lz-card-label, .lz-card-amber .lz-card-label { color: var(--hb-muted); opacity: 1; }
.lz-card-value {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 32px; line-height: 1.1;
  margin: 0; word-break: break-word;
}
.lz-card-value-sm {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 19px; line-height: 1.15;
  margin: 0; color: var(--hb-heading); word-break: break-word;
}
.lz-card-amber .lz-card-value-sm { color: #b47500; }
:root[data-theme="dark"] .lz-card-amber .lz-card-value-sm { color: #f5c451; }
.lz-card-unit { font-size: 11px; margin: 4px 0 0; opacity: 0.8; }
.lz-card-plain .lz-card-unit, .lz-card-amber .lz-card-unit { color: var(--hb-muted); opacity: 1; }

/* principal vs interest */
.lz-split {
  margin-top: 16px; padding: 16px; border-radius: 12px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.lz-split-head, .lz-split-foot { display: flex; justify-content: space-between; font-size: 12.5px; }
.lz-split-head { color: var(--hb-muted); margin-bottom: 8px; }
.lz-split-foot { margin-top: 8px; }
.lz-split-foot strong { font-family: "Montserrat", sans-serif; font-size: 13px; color: var(--hb-heading); }
.lz-split-bar { height: 14px; border-radius: 999px; overflow: hidden; background: rgba(245, 179, 1, 0.45); }
.lz-split-fill { height: 100%; border-radius: 999px; background: var(--hb-brand); transition: width 0.25s ease; }
.is-amber { color: #b47500 !important; }
:root[data-theme="dark"] .is-amber { color: #f5c451 !important; }
.is-brand { color: var(--hb-brand) !important; }

/* ── Summary block ── */
.lz-block {
  margin-top: 18px; border: 1px solid var(--hb-border); border-radius: 14px; overflow: hidden;
  background: var(--hb-card);
}
.lz-block-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 14.5px; color: var(--hb-heading);
}
.lz-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 10px 16px; font-size: 13px; color: var(--hb-muted);
}
.lz-row + .lz-row { border-top: 1px solid var(--hb-border); }
.lz-row[hidden] { display: none; }
.lz-row-value { flex-shrink: 0; font-weight: 600; color: var(--hb-heading); white-space: nowrap; }
.lz-row.is-total { background: rgba(151, 119, 250, 0.12); color: var(--hb-brand); font-weight: 700; }
.lz-row.is-total .lz-row-value { color: var(--hb-brand); font-weight: 700; }

/* ── Schedule ── */
.lz-schedule-card {
  max-width: 900px; margin: 0 auto; overflow: hidden;
  border: 1px solid var(--hb-border); border-radius: 16px; background: var(--hb-card);
}
.lz-table-scroll { overflow-x: auto; }
.lz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lz-table th, .lz-table td { padding: 10px 14px; white-space: nowrap; }
.lz-table thead th {
  background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--hb-muted); text-align: left;
}
.lz-table tbody tr + tr td { border-top: 1px solid var(--hb-border); }
.lz-table tbody td { color: var(--hb-text); }
.lz-table tbody tr:hover td { background: var(--hb-surface); }
.lz-ta-right { text-align: right; }

.lz-table-foot { display: flex; justify-content: center; padding: 12px 16px; border-top: 1px solid var(--hb-border); }
.lz-link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--hb-brand); text-decoration: underline;
}
.lz-link-btn:hover { color: var(--hb-brand-hover); }
.lz-link-btn[hidden] { display: none; }

/* ── Explainer ── */
.lz-explain-card {
  height: 100%; padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.lz-explain-lead { font-weight: 700; font-size: 14.5px; color: var(--hb-heading); margin-bottom: 13px; }
.lz-explain-lead--spaced { margin-top: 20px; }
/* JobHub resets `ol, ul { list-style: none }` globally. */
.lz-explain-steps { margin: 0 0 16px; padding-left: 22px; list-style: decimal outside; }
.lz-explain-steps li { margin-bottom: 10px; }
.lz-explain-steps li::marker { color: var(--hb-brand); font-weight: 700; }
.lz-explain-steps code {
  font-family: "Montserrat", monospace; font-size: 12.5px; color: var(--hb-brand);
  background: rgba(151, 119, 250, 0.10); padding: 4px 9px; border-radius: 6px;
  display: inline-block; line-height: 1.5;
}
.lz-legend, .lz-explain-list { margin: 0; padding-left: 20px; list-style: disc outside; }
.lz-legend li, .lz-explain-list li { font-size: 13px; line-height: 1.65; color: var(--hb-text); margin-bottom: 7px; }
.lz-legend li:last-child, .lz-explain-list li:last-child { margin-bottom: 0; }
.lz-legend li::marker { color: var(--hb-muted); }
.lz-explain-list li::marker { color: var(--hb-brand); }

.lz-disclaimer {
  max-width: 780px; margin: 26px auto 0; text-align: center;
  font-size: 12.5px; line-height: 1.7; color: var(--hb-muted);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .lz-result { position: static; }
}
@media (max-width: 767px) {
  .lz-panel { padding: 24px 18px; }
  .lz-grid-2, .lz-conditions-grid, .lz-cards-2 { grid-template-columns: 1fr; }
  .lz-products { grid-template-columns: 1fr; }
  .lz-requirements li { flex-direction: column; gap: 1px; }
  .lz-requirements strong { text-align: left; }
  .lz-table th, .lz-table td { padding: 9px 11px; }
}
