/*
 * [vmg_calculator] finance calculator — uses the same brand tokens as
 * showroom.css (--primary/--accent/--surface/--surface-2/--border/--radius/
 * --container), not a separate palette, so it reads as one design system.
 * Font (Montserrat) is loaded by showroom.css's @import; if this page never
 * loads showroom.css, that import is repeated here so the calculator still
 * gets the right font on its own.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --border: #e2e2e1;
  --primary: #2d2d2c;
  --accent: #8bd409;
  --accent-2: #79bf00;
  --radius: 10px;
  --container: 1240px;
}

.vmg-calc {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--primary);
}

.vmg-calc-heading {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 20px;
}

.vmg-calc-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.vmg-calc-field { display: flex; flex-direction: column; }

.vmg-calc-field label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 37px;
  margin-bottom: 8px;
}

.vmg-calc-input,
.vmg-calc-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary);
  font-family: inherit;
  font-size: 15px;
}

.vmg-calc-input::placeholder { color: #999; }

.vmg-calc-input:focus,
.vmg-calc-select:focus { border-color: var(--primary); outline: none; }

.vmg-calc-input[readonly] { cursor: default; }

.vmg-calc-select {
  -webkit-appearance: none; appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232d2d2c' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  cursor: pointer;
}

/* ── Totals — green highlight box (brand accent colour) ─────────────── */
.vmg-calc-totals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  background: var(--accent);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
}
.vmg-calc-total label { font-size: 15px; font-weight: 700; }
.vmg-calc-input--large { height: 52px; font-size: 16px; font-weight: 600; }

/* ── Save Money by... ────────────────────────────────────────────────── */
.vmg-calc-subheading {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 20px;
}
.vmg-calc-row--save { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.vmg-calc-result-label { color: var(--accent-2); }

/* ── Responsive — same breakpoints as showroom.css's .vmg-adv-row ─────── */
@media (max-width: 900px) {
  .vmg-calc-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .vmg-calc-row { grid-template-columns: 1fr; }
  .vmg-calc-totals { grid-template-columns: 1fr; }
}
