/* Instant roof estimator (page + homepage pop-up). Uses the site's CSS variables. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.est-page { display: grid; gap: 2rem; }
@media (min-width: 960px) { .est-page { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; } }
.est-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
@media (min-width: 640px) { .est-card { padding: 1.75rem; } }
.est-aside h2 { font-size: 1.4rem; }
.est-how { padding-left: 1.2rem; display: grid; gap: 0.6rem; margin: 0 0 1.5rem; }

.est { color: var(--text); }
.est-h { font-size: clamp(1.45rem, 3.2vw, 1.9rem); margin: 0 0 0.35rem; color: var(--black); }
.est-sub { color: var(--muted); margin: 0 0 1rem; }
.est-step[hidden] { display: none !important; }
.est-step + .est-step { margin-top: 1.5rem; }
.est-step:not(.is-active) { }
.est-banner {
  background: #fff4cf; border: 1px dashed #b38600; color: #5c4400; border-radius: 8px;
  padding: 0.55rem 0.8rem; font-size: 0.82rem; margin: 0 0 0.75rem; line-height: 1.4;
}
.est-banner-mock { background: #e8f1ff; border-color: #3b6fc4; color: #17386b; }

.est-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.est-address-row { display: grid; gap: 0.6rem; }
@media (min-width: 560px) { .est-address-row { grid-template-columns: 1fr auto; } }
.est input[type="text"], .est input[type="number"], .est select {
  font: inherit; padding: 0.75rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); width: 100%;
}
.est input:focus, .est select:focus { border-color: var(--green); outline: 2px solid var(--green-light); }
.est-error { color: #9b1c1c; font-size: 0.9rem; margin: 0.5rem 0 0; }
.est-trust { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.est-trust li { background: var(--green-light); color: var(--green-dark); font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; }

.est-loading { text-align: center; padding: 2.5rem 0; color: var(--muted); }
.est-spinner { display: inline-block; width: 2.2rem; height: 2.2rem; border: 4px solid var(--green-light); border-top-color: var(--green); border-radius: 50%; animation: est-spin 0.9s linear infinite; }
@keyframes est-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .est-spinner { animation-duration: 3s; } }

.est-fallback-grid { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .est-fallback-grid { grid-template-columns: 2fr 1fr; } }
.est-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.9rem; }
.est-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.88rem; color: var(--green-dark); text-decoration: underline; cursor: pointer; }
.est-link:hover { color: var(--green); }

.est-address-line { font-weight: 600; margin: 0 0 0.75rem; word-break: break-word; }
.est-stats { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); margin: 0 0 0.9rem; }
.est-stats > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; }
.est-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.est-stats dd { margin: 0.1rem 0 0; font-family: var(--font-head); font-size: 1.25rem; color: var(--black); }
.est-note { font-size: 0.85rem; background: #fff4cf; border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0 0 0.9rem; }

.est-options { border: 0; padding: 0; margin: 0; min-width: 0; }
.est-cards { display: grid; gap: 0.8rem; }
@media (min-width: 760px) { .est-cards { grid-template-columns: repeat(3, 1fr); } }
.est-option {
  position: relative; display: flex; flex-direction: column; gap: 0.2rem; cursor: pointer;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 0.95rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.est-option:hover { border-color: var(--green); }
.est-option.is-selected { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); background: #fbfefc; }
.est-option input { position: absolute; top: 0.85rem; right: 0.85rem; width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
.est-option:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.est-badge { align-self: flex-start; background: var(--gold); color: var(--black); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 999px; margin-bottom: 0.2rem; }
.est-opt-name { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.2; color: var(--black); padding-right: 1.6rem; }
.est-opt-tag { font-size: 0.82rem; color: var(--muted); }
.est-opt-price { font-family: var(--font-head); font-size: 1.45rem; color: var(--green-dark); margin: 0.35rem 0; line-height: 1.15; }
.est-opt-points { margin: 0; padding-left: 1.05rem; font-size: 0.82rem; color: var(--muted); }
.est-fine { font-size: 0.78rem; color: var(--muted); margin: 0.6rem 0 0; }
.est-disclaimer { font-size: 0.85rem; background: var(--bg); border-left: 4px solid var(--green); padding: 0.6rem 0.8rem; border-radius: 6px; margin: 0.8rem 0; }
.est-wrong { font-size: 0.88rem; }

.est-lead { border-top: 2px solid var(--line); padding-top: 1.25rem; }
.est-chosen { background: var(--green-light); border-radius: 8px; padding: 0.55rem 0.8rem; margin: 0; font-size: 0.92rem; }
.est-chosen:empty { display: none; }
.est-thanks { text-align: center; padding: 1.5rem 0; }

/* Homepage call-out band + hero button */
.btn-gold { background: var(--gold); color: var(--black); border-color: var(--gold); }
.btn-gold:hover { background: #ffd65c; border-color: #ffd65c; color: var(--black); }
.est-band { background: var(--green); color: var(--white); padding: 1.4rem 0; }
.est-band-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.est-band h2 { color: var(--white); font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0; }
.est-band p { margin: 0.2rem 0 0; color: #e8f6ee; }

/* Pop-up */
.est-dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(46rem, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); box-shadow: 0 20px 60px rgba(0,0,0,.4); background: var(--white); }
.est-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.est-dialog-inner { position: relative; padding: 1.25rem 1.1rem 1.4rem; max-height: calc(100dvh - 1rem); overflow-y: auto; }
@media (min-width: 640px) { .est-dialog-inner { padding: 1.75rem 1.9rem 1.9rem; } }
.est-dialog-close { position: absolute; top: 0.5rem; right: 0.6rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--bg); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--black); z-index: 2; }
.est-dialog-close:hover { background: var(--green-light); }
.est-dialog .est-h { padding-right: 2.4rem; }
html.est-modal-open { overflow: hidden; }
.est-attrib { font-size: 0.75rem; color: #5e5e5e; margin: -0.4rem 0 0.9rem; font-family: Roboto, "Poppins", sans-serif; }
.est-surcharge { font-size: 0.9rem; color: var(--green-dark); font-weight: 600; margin: -0.2rem 0 0.9rem; }
