/* shared/components.css
   Light surfaces, generous rounding, soft shadows - the reference's feel,
   on Maidenbaum's colours. */

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-4) var(--space-6);
  font-family: var(--ui);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .14s ease, color .14s ease, border-color .14s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Brand orange fill, navy label: 5.25:1. Their white-on-orange is 2.27:1. */
.btn--primary { background: var(--orange); color: var(--navy-700); box-shadow: var(--shadow-sm); }
.btn--primary:hover:not([disabled]) { background: var(--orange-hover); }

.btn--ghost { background: var(--paper); color: var(--navy-700); border-color: var(--line-strong); }
.btn--ghost:hover:not([disabled]) { border-color: var(--navy-700); }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 48px; padding: var(--space-3) var(--space-5); font-size: var(--text-sm); }

/* ---------------- The address pill ----------------
   The reference's signature element: one tall rounded field with an inline
   action. It is the first thing on every flow that starts with an address. */
.pill-field { position: relative; }
.pill-field__shell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.pill-field__shell:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 4px var(--navy-100); }
.pill-field__icon { flex: none; width: 22px; height: 22px; color: var(--orange-ink); }
.pill-field input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  background: transparent;
  font-family: var(--ui);
  font-size: var(--text-lg);
  color: var(--ink);
  padding: 0;
}
.pill-field input:focus { outline: none; }
.pill-field input::placeholder { color: var(--ink-3); }
.pill-field .btn { flex: none; }
@media (max-width: 34rem) {
  .pill-field__shell { flex-wrap: wrap; border-radius: var(--radius-lg); padding: var(--space-3); }
  .pill-field input { flex-basis: 100%; padding-inline: var(--space-3); }
  .pill-field .btn { width: 100%; }
}

/* ---------------- Fields ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: var(--space-4); }
.field:last-child { margin-bottom: 0; }

.field__label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.field__label .req, .req { color: var(--red-600); margin-left: 2px; }

.field__input,
.field__textarea {
  width: 100%;
  min-height: 50px;
  padding: var(--space-3) var(--space-4);
  font-family: var(--ui);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.field__textarea { min-height: 92px; resize: vertical; }
.field__input:hover, .field__textarea:hover { border-color: var(--line-strong); }
.field__input:focus, .field__textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px var(--navy-100);
}
.field__input[aria-invalid='true'], .field__textarea[aria-invalid='true'] {
  border-color: var(--red-600); background: var(--red-wash);
}
.field__error {
  font-size: var(--text-sm);
  color: var(--red-600);
  margin: var(--space-1) 0 0;
  font-weight: 600;
}
.field__error:empty { display: none; }

.field--checkbox { flex-direction: row; align-items: flex-start; gap: var(--space-3); }
.field--checkbox input { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--navy-700); }
.field--checkbox label { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.55; }

.field-grid { display: grid; gap: 0 var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 30rem) {
  /* City / State / Zip: equal thirds starve City and squeeze State to 68px.
     Floors keep State and Zip legible however narrow the column gets. */
  .field-grid--addr {
    grid-template-columns: minmax(0, 2.1fr) minmax(92px, 0.85fr) minmax(108px, 1.05fr);
  }
}
@media (min-width: 40rem) {
  .field-grid--2 { grid-template-columns: 1fr 1fr; }
  .field-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------------- Card ---------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}
@media (min-width: 48rem) { .card { padding: var(--space-6) var(--space-7); } }

/* ---------------- Trust strip ----------------
   The reference's white pill of three reassurances under the input. */
.trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: var(--space-3) var(--space-5);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 44rem) { .trust { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }
.trust li { display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.trust svg { width: 18px; height: 18px; flex: none; color: var(--orange-ink); }
.trust b { color: var(--navy-700); font-weight: 800; }

/* ---------------- Progress / stepper ---------------- */
.progress { height: 6px; background: var(--navy-100); border-radius: var(--radius-pill); overflow: hidden; }
.progress__bar { height: 100%; background: var(--orange); border-radius: var(--radius-pill); transition: width .25s ease; }

.stepper { display: flex; align-items: center; gap: var(--space-2); }
.stepper__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy-100); }
.stepper__dot--done { background: var(--navy-500); }
.stepper__dot--current { background: var(--orange); transform: scale(1.35); }

/* ---------------- Chrome ----------------
   Reproduces mptrg.com/getstarted's header - #073363, Montserrat, wordmark
   left, English/Espanol right, tagline beneath - at a smaller scale.

   WHY SMALLER. Their logo.png is 591x61, and the live page renders it at
   its natural 591px. On any 2x display that is a 1x image blown up, which
   is why it looks soft there and looked soft here. Capping it at 280px
   gives 2.1x density from the same file, so it is sharp, and the bar comes
   down from 159px to about 95px.

   No larger asset exists - every logo Maidenbaum publishes is smaller
   still (maidenbaumtax.com ships 433x46 and 424x14). To go bigger AND
   sharp the wordmark has to be redrawn as SVG. */
.site-header {
  background-color: var(--navy-header);
  padding-top: 22px;
  padding-bottom: 18px;
  position: relative;
  font-family: 'Montserrat', var(--ui);
  font-size: 15px;
}
.site-header__inner {
  max-width: 1170px;
  margin-inline: auto;
  padding-inline: 15px;
  display: flex;
  align-items: flex-start;
}

.site-header__brand { display: block; text-decoration: none; min-width: 0; }
.site-header__logo {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}
.site-header__tagline {
  display: block;
  margin: 10px 0 0;
  max-width: 100%;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Their .lang-link rules, verbatim. */
.lang { margin-left: auto; color: #fff; white-space: nowrap; }
.lang a { text-decoration: none; padding: 5px 5px; margin: 0 5px; border-radius: 5px; color: #fff; }
.lang a:hover { color: #d2d2d2; }
.lang a.active { color: #fff; text-decoration: underline; }

@media (max-width: 40rem) {
  .site-header { padding-top: 18px; padding-bottom: 14px; font-size: 14px; }
  .site-header__inner { flex-wrap: wrap; gap: 10px; }
  .site-header__logo { width: 200px; }
  .site-header__tagline { font-size: 11px; margin-top: 8px; }
  .lang { margin-left: 0; }
  .lang a { margin: 0 8px 0 0; padding: 4px 0; }
}

.site-footer { background: transparent; color: var(--ink-3); padding-block: var(--space-6) var(--space-7); font-size: var(--text-sm); border-top: 1px solid var(--line); }
.site-footer a { color: var(--navy-600); }
.site-footer__grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1fr 2fr; } }
.site-footer__phone { font-size: var(--text-xl); font-weight: 800; color: var(--navy-700); text-decoration: none; }

/* ---------------- Out-of-county notice ---------------- */
.notice--reject {
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--red-wash);
  border: 1px solid var(--red-600);
  border-radius: var(--radius);
}
.notice--reject h3 { color: var(--red-600); margin-bottom: var(--space-2); }
.notice--reject p:last-child { margin-bottom: 0; }

/* A refusal from the server (validation, rate limit, network). Added for the
   LP system's real submit; the standalone pages never failed to send. */
.form-error {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--red-wash);
  border: 1px solid var(--red-600);
  border-radius: var(--radius);
  color: var(--red-600);
  font-size: var(--text-sm);
}
.form-error[hidden] { display: none; }

/* Turnstile, when it is switched on in settings, sits under the button. */
#lp-fields .cf-turnstile { margin-top: var(--space-4); }

/* ---------------- Address autocomplete ---------------- */
.addr-list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.addr-list li {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--ink);
  min-height: 48px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
}
.addr-list li:hover, .addr-list li[aria-selected='true'] { background: var(--navy-50); }
.addr-status { font-size: var(--text-sm); color: var(--ink-3); margin: var(--space-3) 0 0; text-align: center; }
.addr-status:empty { display: none; }

/* ---------------- Review list ---------------- */
.review { margin: 0 0 var(--space-5); background: var(--navy-50); border-radius: var(--radius); padding: var(--space-4) var(--space-5); }
.review div { display: flex; justify-content: space-between; gap: var(--space-5); padding: var(--space-2) 0; }
.review div + div { border-top: 1px solid var(--navy-100); }
.review dt { font-size: var(--text-sm); color: var(--ink-3); flex: none; }
.review dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------------- Sticky mobile CTA ---------------- */
.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
@media (min-width: 48rem) { .sticky-cta { display: none; } }

/* ---------------- Wide form grid ----------------
   A twelve-column track so a long form can be laid out across the width
   instead of down the page. Collapses to six columns, then to one. */
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--space-4); }
.grid12 > .w2 { grid-column: span 2; }
.grid12 > .w3 { grid-column: span 3; }
.grid12 > .w4 { grid-column: span 4; }
.grid12 > .w5 { grid-column: span 5; }
.grid12 > .w6 { grid-column: span 6; }
.grid12 > .w12 { grid-column: span 12; }

@media (max-width: 62rem) {
  .grid12 { grid-template-columns: repeat(6, 1fr); }
  .grid12 > .w2 { grid-column: span 2; }
  .grid12 > .w3 { grid-column: span 3; }
  .grid12 > .w4 { grid-column: span 3; }
  .grid12 > .w5 { grid-column: span 6; }
  .grid12 > .w6 { grid-column: span 6; }
  .grid12 > .w12 { grid-column: span 6; }
}

/* Phone: stay on six tracks and reset each span class by name. A blanket
   `.grid12 > *` loses to the more specific `.w3`/`.w5` rules above, and the
   leftover spans made grid invent implicit columns rather than wrap - which
   is how Lot ended up 30px wide. */
@media (max-width: 44rem) {
  .grid12 > .w3,
  .grid12 > .w4,
  .grid12 > .w5,
  .grid12 > .w6,
  .grid12 > .w12 { grid-column: span 6; }
  .grid12 > .w2 { grid-column: span 2; }
}
