/**
 * LOAD OFF CO. — Load Estimator styles
 * Loaded after /assets/blog/blog.css, which supplies the shared
 * header/footer/nav shell and the brand CSS variables (--navy,
 * --gold, --charcoal, --offwhite, --white, --muted, --line,
 * --radius, --shadow). This file only styles the estimator wizard.
 */

.estimator-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 193, 7, 0.16), transparent 28%),
    var(--navy);
  padding: 48px 0 34px;
  text-align: center;
}

.estimator-hero-inner {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.estimator-hero .eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.estimator-hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 6vw, 58px);
}

.estimator-hero p {
  max-width: 560px;
  margin: 14px auto 0;
  color: #e6eaf0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}

.estimator-hero .mascot {
  width: 84px;
  height: auto;
  margin: 18px auto 0;
  display: block;
}

/* ---------- Shell / layout ---------- */

.estimator-shell {
  width: min(760px, calc(100% - 32px));
  margin: -28px auto 70px;
  position: relative;
  z-index: 2;
}

.estimator-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px 26px;
}

/* ---------- Progress indicator ---------- */

.estimator-progress {
  margin-bottom: 22px;
}

.estimator-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.estimator-progress-label strong { color: var(--navy); }

.estimator-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--offwhite);
  overflow: hidden;
}

.estimator-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gold);
  transition: width 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .estimator-progress-fill { transition: none; }
}

/* ---------- Step heading ---------- */

.estimator-step h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 30px);
}

.estimator-step .estimator-help {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.estimator-field { margin-bottom: 18px; }

.estimator-field label,
.estimator-field legend {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}

.estimator-field select,
.estimator-field input[type="text"],
.estimator-field input[type="tel"],
.estimator-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #dcdfe4;
  border-radius: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 16px; /* prevents iOS input zoom, matches the main contact form fix */
  line-height: 1.4;
  color: var(--charcoal);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

.estimator-field select:focus,
.estimator-field input:focus,
.estimator-field textarea:focus {
  outline: 3px solid rgba(255, 193, 7, 0.55);
  outline-offset: 1px;
  border-color: var(--gold);
}

.estimator-note {
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fff8da;
  color: #4a3d00;
  font-size: 13px;
  line-height: 1.5;
}

.estimator-note.warn {
  border-left-color: #c0392b;
  background: #fdecea;
  color: #7a2018;
}

/* ---------- Selection cards (fieldset of radios/checkboxes as cards) ---------- */

.estimator-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.estimator-option {
  position: relative;
}

.estimator-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.estimator-option label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  height: 100%;
  padding: 14px 14px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 150ms ease, background 150ms ease;
}

.estimator-option label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #9aa3b2;
  border-radius: 5px;
  background: var(--white);
  flex: 0 0 auto;
}

.estimator-option input[type="radio"] + label::before { border-radius: 999px; }

.estimator-option input:checked + label {
  border-color: var(--gold);
  background: #fffaf0;
}

.estimator-option input:checked + label::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 3px var(--white);
}

.estimator-option input:focus-visible + label {
  outline: 3px solid rgba(255, 193, 7, 0.6);
  outline-offset: 2px;
}

.estimator-option .opt-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.estimator-option .opt-detail {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.estimator-option .opt-check {
  align-self: flex-end;
  margin-top: -18px;
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  visibility: hidden;
}

.estimator-option input:checked ~ .opt-check,
.estimator-option input:checked + label .opt-check { visibility: visible; }

/* ---------- Load-size cards with CSS truck-fill graphic ---------- */

.load-size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.load-size-option label {
  padding: 16px 14px 14px;
}

.load-size-option label::before { display: none; }

.truck-fill {
  width: 100%;
  height: 46px;
  border: 2px solid var(--navy);
  border-radius: 6px 6px 4px 4px;
  background: var(--offwhite);
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.truck-fill::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  background: linear-gradient(180deg, #ffd75e, var(--gold));
  transition: height 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .truck-fill::after { transition: none; }
}

.load-size-option .opt-price {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  color: var(--navy);
}

.load-size-option .opt-example {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.load-size-option input:checked + label {
  border-color: var(--gold);
  background: #fffaf0;
}

.load-size-option input:checked + label .truck-fill {
  border-color: var(--gold);
}

/* ---------- Quantity steppers (special items) ---------- */

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.qty-row:first-of-type { border-top: 1px solid var(--line); }

.qty-row-label { min-width: 0; }

.qty-row-label .name { font-weight: 700; color: var(--navy); display: block; }
.qty-row-label .price { font-size: 12px; color: var(--muted); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
}

.qty-stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--offwhite);
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.qty-stepper button:hover { background: #ecedf1; }
.qty-stepper button:focus-visible { outline: 3px solid rgba(255, 193, 7, 0.6); outline-offset: -3px; }

.qty-stepper .qty-value {
  width: 40px;
  text-align: center;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.custom-quote-checklist {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.custom-quote-checklist > p {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 6px 2px;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.checkbox-row label { font-size: 14px; font-weight: 600; color: var(--charcoal); }

/* ---------- Step navigation ---------- */

.estimator-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.estimator-actions .btn {
  min-height: 48px;
  min-width: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-back {
  background: var(--white);
  border-color: var(--line);
  color: var(--navy);
}

.btn-back:hover { border-color: var(--navy); }

.btn-continue {
  background: var(--gold);
  color: var(--navy);
}

.btn-continue:hover { background: #ffd044; }

.btn-continue:disabled,
.btn-continue[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.estimator-reset {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  min-height: 44px;
}

/* ---------- Result panel ---------- */

.estimator-result-panel {
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
}

.estimator-result-panel .result-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.estimator-result-panel .result-figure {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(34px, 7vw, 52px);
  letter-spacing: 0.02em;
  margin: 0;
}

.estimator-result-panel .result-sub {
  margin: 10px 0 0;
  color: #dbe1e9;
  font-size: 14px;
  line-height: 1.5;
}

.estimator-breakdown {
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.estimator-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.estimator-breakdown li:first-child { border-top: 1px solid var(--line); }
.estimator-breakdown .b-label { color: var(--charcoal); font-weight: 600; }
.estimator-breakdown .b-detail { color: var(--navy); font-weight: 800; white-space: nowrap; }

.estimator-disclaimer {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--offwhite);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.estimator-handoff {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.estimator-handoff .btn {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0 16px;
}

.btn-sms {
  background: var(--gold);
  color: var(--navy);
}

.btn-sms:hover { background: #ffd044; }

.btn-form {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-form:hover { background: var(--navy); color: var(--white); }

/* ---------- Live region (visually present, not visually-hidden, since results are the primary content) ---------- */

.estimator-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 660px) {
  .estimator-hero { padding: 38px 0 30px; }
  .estimator-shell { margin-top: -22px; width: min(100% - 24px, 760px); }
  .estimator-card { padding: 22px 16px 20px; }
  .estimator-card-grid,
  .load-size-grid { grid-template-columns: 1fr; }
  .estimator-actions {
    position: sticky;
    bottom: 0;
    background: var(--white);
    padding-top: 12px;
    margin-top: 18px;
    box-shadow: 0 -8px 16px rgba(13, 27, 51, 0.08);
  }
}
