/* ==========================================================================
   Bye Bye Junk v2: photo size guess (quote step 2)
   Same sticker-card language as quote.css: ink outline, hard offset shadow,
   Lilita display, Barlow body. Only transform and opacity move. The whole
   block is `hidden` in the HTML until estimate-ui.js reveals it.
   ========================================================================== */

.est { margin: 1.6rem 0 0; }

/* ---------- the ask ---------- */
.est-ask {
  position: relative; padding: 1.1rem 1.1rem 1.2rem; border: 3px solid var(--ink); border-radius: 22px;
  background: #FFFDF7; box-shadow: 6px 6px 0 var(--ink);
}
.est-mini { position: absolute; right: .9rem; top: -1.45rem; width: 84px; height: auto; rotate: 4deg; scale: -1 1; pointer-events: none; } /* the site's truck faces left; the shared symbol faces right */
.est-title { font-size: clamp(1.7rem, 6.6vw, 2.2rem); line-height: .94; text-transform: uppercase; margin: 0 0 .7rem; max-width: calc(100% - 3.6rem); text-wrap: balance; }
.est-lede { font: 600 1.02rem/1.4 var(--body); margin: 0 0 1rem; max-width: 46ch; }
.est-btn { width: 100%; min-height: 3.4rem; font-size: 1.25rem; }
.est-btn:disabled { --bg: #E4DBC6; --fg: #3A4B5A; border-style: dashed; cursor: progress; transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(14, 34, 51, .35); }
.est-btn:disabled:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(14, 34, 51, .35); }
.est-fine { margin: .85rem 0 0; font-size: .92rem; line-height: 1.4; color: rgba(14, 34, 51, .82); max-width: 54ch; }
@container qcard (min-width: 520px) {
  .est-btn { width: auto; min-width: 15rem; }
  .est-ask { padding-right: 7rem; }
  .est-mini { right: 1.2rem; top: -1.7rem; width: 104px; }
}

/* ---------- waiting: a truck loops along a road. Static, parked mid-road, when motion is off ---------- */
.est-out { margin-top: 1.2rem; }
.est-out:empty { display: none; }
.est-wait { padding: 1rem 1.1rem 1.1rem; border: 3px dashed var(--ink); border-radius: 22px; background: #fff; text-align: center; }
.est-wait:focus-visible { outline-offset: 5px; }
.est-road { position: relative; height: 54px; container-type: inline-size; overflow: clip; margin-bottom: .6rem; }
.est-lane {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px; border-radius: 999px; background: var(--ink);
}
.est-lane::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 3px; margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 10px, transparent 10px 20px);
}
.est-rig { position: absolute; left: 0; bottom: 4px; width: 64px; height: auto; scale: -1 1; translate: calc(50cqw - 32px) 0; }
.motion-on .est-rig { animation: est-drive 2.6s linear infinite; }
@keyframes est-drive { from { translate: calc(100cqw + 8px) 0; } to { translate: -72px 0; } } /* faces left, so it drives left */
.est-wait-h { margin: 0; font: 400 1.5rem/1.05 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.est-wait-s { margin: .3rem 0 0; font: 600 1rem/1.35 var(--body); }

/* ---------- result card ---------- */
/* Tight on a phone on purpose: tab to last line fits one 390x844 screen. Nothing is hidden, the promise sentences stay in. */
.est-card, .est-wait {
  scroll-margin-top: calc(var(--hh, 80px) + 2.5rem);
}
.est-card {
  position: relative; padding: 1.1rem .95rem .8rem; border: 3px solid var(--ink); border-radius: 22px;
  background: #FFFDF7; box-shadow: 6px 6px 0 var(--ink);
}
.motion-on .est-card { animation: est-pop .55s var(--ease-out) backwards; }
@keyframes est-pop { from { opacity: 0; transform: translateY(16px) rotate(-.6deg); } }
.est-tab {
  position: absolute; left: 1rem; top: -1.05rem; margin: 0; padding: .22rem .8rem .26rem; rotate: -2.5deg;
  border: 3px solid var(--ink); border-radius: 8px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink);
  font: 400 1rem/1 var(--display); letter-spacing: .05em; text-transform: uppercase;
}
.est-big { font-size: clamp(1.2rem, 5vw, 2.5rem); line-height: .95; text-transform: uppercase; --mis: var(--orange); margin: .2rem 0 .4rem; text-wrap: balance; }
.est-big:focus-visible { outline-offset: 6px; }

/* phone: meter, then the spotted list, then the promise block, all in one column */
.est-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; }
.est-side { min-width: 0; }
.est-fig { min-width: 0; }
.est-sure { min-width: 0; }
.est-meterbox { position: relative; width: 100%; max-width: 330px; margin-inline: auto; }
.est-meter { display: block; width: 100%; height: auto; overflow: visible; }
.est-ticks { position: relative; height: 1.1rem; margin-top: -.15rem; }
.est-tick { position: absolute; top: 0; translate: -50% 0; font: 600 max(12px, .75rem)/1.2 var(--body); color: var(--ink); white-space: nowrap; }
.est-maybe { font: 400 26px var(--hand); fill: var(--rust); }
.est-seg rect { transform-box: fill-box; transform-origin: 50% 100%; }
.motion-on .est-seg.is-full rect, .motion-on .est-seg.is-maybe rect { animation: est-drop .5s var(--ease-out) backwards; animation-delay: calc(var(--i) * 80ms + 220ms); }
@keyframes est-drop { from { opacity: 0; transform: translateY(-14px) scaleY(.6); } }
.est-label { margin: 0 0 .3rem; font: 600 .74rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: rgba(14, 34, 51, .78); }

/* chips: the name wraps inside the chip (never an ellipsis), a long name takes the whole row */
.est-chips { display: flex; flex-wrap: wrap; gap: .3rem .4rem; margin: 0 0 .45rem; }
.est-chips li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .6rem .1rem .15rem; max-width: 100%; min-width: 0;
  border: 2px solid var(--ink); border-radius: 18px; background: #fff; font: 600 .86rem/1.15 var(--body);
}
.est-name { min-width: 0; overflow-wrap: anywhere; }
.est-chips li.est-more { padding: .15rem .7rem; border-radius: 999px; border-style: dashed; background: transparent; font-weight: 500; }
.est-chips b {
  display: grid; place-items: center; flex: none; min-width: 1.35rem; height: 1.35rem; padding: 0 .2rem; border-radius: 999px;
  background: var(--yellow); border: 2px solid var(--ink); font: 400 .9rem/1 var(--display);
}
.est-focus { margin: 0 0 .4rem; font: 600 .86rem/1.25 var(--body); color: var(--ink, #0E2233); }
.est-heads { margin: 0 0 .45rem; padding: .3rem .65rem; font-size: .84rem; line-height: 1.25; }
.est-skip { margin: .5rem 0 0; font-size: .88rem; line-height: 1.35; color: rgba(14, 34, 51, .82); }

/* the promise block: price (or "a person replies"), the first-guess line and the wider-shot advice together */
.est-sure { padding: .45rem .75rem .5rem; border: 3px dashed var(--ink); border-radius: 16px; background: var(--paper-2); font: 600 .86rem/1.3 var(--body); }
.est-sure p { margin: 0; }
.est-sure strong { font-weight: 700; }
.est-sure .est-price { container-type: inline-size; margin: 0 0 .25rem; }
.est-price-k { display: block; font-size: .82rem; line-height: 1.2; color: rgba(14, 34, 51, .82); }
.est-price-v { display: block; margin-top: .05rem; white-space: nowrap; font: 400 clamp(1.3rem, 11cqi, 2.4rem)/1 var(--display); /* scales with the block, so even a four digit range stays on one line at 320 */ color: var(--blue); text-shadow: .04em .04em 0 var(--yellow); }
.est-sure .est-demo {
  display: inline-block; margin: 0 0 .3rem; padding: .15rem .6rem .2rem; rotate: -1.5deg;
  border: 3px solid var(--ink); border-radius: 8px; background: var(--rust); color: var(--paper); box-shadow: 3px 3px 0 var(--ink);
  font: 400 .74rem/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase;
}
.est-sure .est-low { margin-top: .3rem; padding-top: .3rem; border-top: 2px solid rgba(14, 34, 51, .25); }

.est-actions { margin-top: .2rem; }
.est-retry { min-height: 2.8rem; }
.est-soft { padding-top: 1.2rem; }
.est-soft .est-always { margin: 0 0 .7rem; padding-left: .85rem; border-left: 6px solid var(--orange); font: 600 .92rem/1.3 var(--body); }
.est-msg { margin: 0 0 .9rem; font: 600 1.2rem/1.35 var(--body); max-width: 40ch; }
.est-msg:focus-visible { outline-offset: 5px; }

@container qcard (min-width: 600px) {
  .est-card { padding: 1.5rem 1.3rem 1.1rem; }
  .est-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "fig side" "sure side"; align-items: start; gap: .8rem 1.4rem; }
  .est-fig { grid-area: fig; }
  .est-side { grid-area: side; }
  .est-sure { grid-area: sure; font-size: .92rem; }
  .est-big { font-size: clamp(2rem, 5.4cqi, 2.6rem); margin-bottom: .7rem; }
}
@media (max-width: 380px) {
  .est-ask, .est-card { padding-inline: .85rem; }
  .est-btn { font-size: 1.1rem; padding-inline: 1rem; }
  .est-title { font-size: 1.55rem; }
}
