/* /estimate/ + /macbook-estimate/ — three-step price calculator
   (brand → device → services). Shared tokens come from
   /_astro/BaseLayout.DQFxDK5l.css (:root vars, .btn, .lp-* components).

   Copy note: this is a Google Ads landing domain, so nothing here says
   "repair" — the labels in est-data.js are generated ads-safe. */

/* scroll-margin clears the sticky .site-header when the hero's "Check Prices"
   button jumps to #estimate (html already has scroll-behavior: smooth). */
.est-hero { display: block; padding-top: 1.2rem; scroll-margin-top: 84px; }
.est-hero .est-head { max-width: 760px; }
.est-hero .est-head p { color: var(--muted); }

.est-card {
  max-width: 1060px;
  margin: 1.4rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

/* ---- search ------------------------------------------------------------- */

.est-search { position: relative; }
.est-search-top { max-width: 660px; margin: 0 auto; }
.est-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}
.est-search input {
  width: 100%;
  padding: .85rem 1rem .85rem 2.8rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: 500 .97rem/1.3 var(--font-body);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.est-search input::placeholder { color: #9aa0a8; }
.est-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(254, 134, 1, .14);
}
.est-search input::-webkit-search-cancel-button { cursor: pointer; }

/* type-ahead results under the top search */
.est-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + .4rem);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.est-suggest li button {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  width: 100%;
  padding: .6rem .75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: 600 .93rem/1.3 var(--font-body);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.est-suggest li button small { font-weight: 500; color: var(--muted); }
.est-suggest li button:hover,
.est-suggest li button:focus-visible { background: var(--bg-soft); outline: none; }
.est-suggest .est-suggest-none {
  padding: .7rem .75rem;
  font-size: .9rem;
  color: var(--muted);
}

/* ---- step rail ---------------------------------------------------------- */

.est-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 1.4rem 0 1.6rem;
  padding: 0;
  list-style: none;
}
.est-steps-sep { color: #c9cdd3; font-size: 1.1rem; line-height: 1; padding: 0 .2rem; }
.est-stepbtn {
  padding: .5rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 700 .92rem/1.2 var(--font-headings);
  color: var(--muted);
  cursor: default;
}
.est-stepbtn[data-done="1"] { color: var(--orange-ink); cursor: pointer; }
.est-stepbtn[data-done="1"]:hover { background: var(--bg-soft); }
.est-stepbtn.is-on { background: var(--grad); color: #fff; cursor: default; }

/* ---- 1. brands ---------------------------------------------------------- */

.est-brands {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .8rem;
}
.est-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 128px;
  padding: 1.1rem .6rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font: 700 .95rem/1.2 var(--font-headings);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.est-brand svg { width: 38px; height: 38px; color: var(--muted); transition: color .15s; }
.est-brand > span { display: block; }
.est-brand small { display: block; margin-top: .15rem; font: 500 .78rem/1.2 var(--font-body); color: var(--muted); }
.est-brand:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.est-brand:hover svg { color: var(--brand-deep); }
.est-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- 2. devices --------------------------------------------------------- */

.est-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.1rem;
  padding: 0;
  border: 0;
  background: none;
  font: 700 .95rem/1.2 var(--font-headings);
  color: var(--orange-ink);
  cursor: pointer;
}
.est-back:hover { text-decoration: underline; }

.est-models {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin-top: 1.1rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: .25rem;
}
.est-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem 1rem;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.est-model:hover { border-color: var(--brand); background: #fff; }
.est-model:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.est-model > span { min-width: 0; }
.est-model b { display: block; font: 700 .95rem/1.35 var(--font-headings); color: var(--ink); }
.est-model > span > span { font: 500 .82rem/1.3 var(--font-body); color: var(--muted); }
.est-model .est-chev { flex: none; color: #b6bbc2; font-size: 1.1rem; line-height: 1; }
.est-empty { padding: 1.4rem 0; color: var(--muted); font-size: .93rem; }

/* ---- 3. services -------------------------------------------------------- */

.est-model-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.est-model-head svg { width: 34px; height: 34px; color: var(--muted); flex: none; }
.est-model-head h3 {
  flex: 1 1 auto;
  margin: 0;
  font: 800 1.22rem/1.25 var(--font-headings);
  color: var(--ink);
}
.est-bulk { display: flex; gap: 1rem; flex: none; }
.est-bulk button {
  border: 0;
  padding: 0;
  background: none;
  font: 700 .9rem/1.2 var(--font-headings);
  color: var(--orange-ink);
  cursor: pointer;
}
.est-bulk button:hover { text-decoration: underline; }

.est-services { margin: 1rem 0 0; padding: 0; list-style: none; }
.est-services li { margin-bottom: .55rem; }
.est-svc {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: .85rem 1.1rem;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.est-svc:hover { border-color: var(--brand); }
.est-svc:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.est-box {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.8px solid #c9cdd3;
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: background .15s, border-color .15s;
}
.est-box::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .12s ease-out;
}
.est-svc-name { flex: 1 1 auto; font: 600 .95rem/1.35 var(--font-body); color: var(--ink); }
.est-svc-price {
  flex: none;
  font: 800 1rem/1.2 var(--font-headings);
  color: var(--ink);
  white-space: nowrap;
}
.est-svc-price.is-quote { font-size: .9rem; font-weight: 700; color: var(--muted); }
.est-svc[aria-checked="true"] {
  border-color: var(--brand);
  background: linear-gradient(135deg, #fda60016, #fe650010);
}
.est-svc[aria-checked="true"] .est-box { background: var(--brand-deep); border-color: var(--brand-deep); }
.est-svc[aria-checked="true"] .est-box::after { transform: rotate(45deg) scale(1); }

/* running total + WhatsApp handoff */
.est-bar {
  margin-top: 1.4rem;
  padding: 1.35rem 1.5rem 1.15rem;
  background: var(--ink);
  border-radius: 16px;
  color: #fff;
}
.est-bar-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.est-bar-eyebrow {
  display: block;
  font: 700 .95rem/1.2 var(--font-headings);
  color: #fff;
}
.est-bar-sub { margin: .3rem 0 0; font-size: .88rem; color: rgba(255, 255, 255, .68); }
.est-bar-total {
  margin: 0;
  font-family: var(--font-headings);
  font-size: clamp(1.7rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.est-bar-total small {
  font-size: .42em;
  font-weight: 600;
  color: rgba(255, 255, 255, .6);
  margin-left: .35rem;
}
.est-go { width: 100%; justify-content: center; margin-top: 1.05rem; padding-block: .85rem; }
.est-note {
  margin: .8rem 0 0;
  text-align: center;
  font-size: .82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .6);
}
.est-miss { margin: 1rem 0 0; text-align: center; font-size: .88rem; color: var(--muted); }

/* press/awards under the calculator */
.est-press { max-width: 1060px; margin: 1.8rem auto 0; text-align: center; }
.est-press .lp-press-row { justify-content: center; }

@media (max-width: 900px) {
  .est-brands { grid-template-columns: repeat(3, 1fr); }
  .est-models { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .est-card { padding: 1.1rem; border-radius: 14px; }
  .est-brands { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .est-brand { min-height: 108px; font-size: .88rem; }
  .est-brand svg { width: 32px; height: 32px; }
  .est-steps { margin: 1.1rem 0 1.2rem; gap: 0; flex-wrap: nowrap; }
  .est-steps-sep { padding: 0; font-size: .95rem; }
  .est-stepbtn { padding: .42rem .62rem; font-size: .8rem; white-space: nowrap; }
  .est-model-head h3 { flex: 1 1 100%; order: 3; }
  .est-bar { padding: 1.1rem; }
  .est-svc { padding: .75rem .85rem; gap: .7rem; }
  .est-svc-name { font-size: .9rem; }
}
