/* A-1 project estimator (inc/estimator.php). Loaded only on pages that use [a1_estimator]. */
.a1-est { max-width: 1000px; margin-inline: auto; color: var(--ink, #0d2a1c); }
.a1-est fieldset { border: 0; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0; min-width: 0; }
.a1-est legend { display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px; font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.8rem); font-weight: 600; line-height: 1.2; }
.a1-est-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink, #0d2a1c); color: #f6e016; font-size: 1rem; font-weight: 600; }

.a1-est-page .con-sub { max-width: 58ch; }
.a1-est-page .est-tool { padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(40px, 6vw, 80px); }

/* Service cards: radio buttons you can tap. */
.a1-est-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.a1-est-card { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px; background: #fffdf8; border: 1.5px solid rgb(13 42 28 / 0.16); border-radius: var(--r, 14px); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.a1-est-card:hover { border-color: rgb(13 42 28 / 0.5); }
.a1-est-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.a1-est-card:has(input:checked) { border-color: var(--ink, #0d2a1c); box-shadow: inset 0 0 0 1.5px var(--ink, #0d2a1c); background: #fff; }
.a1-est-card:has(input:focus-visible) { outline: 3px solid #f6e016; outline-offset: 2px; }
.a1-est-card-t { font-weight: 600; font-size: 1.0625rem; line-height: 1.25; }
.a1-est-card-n { font-size: 0.9375rem; line-height: 1.35; color: var(--muted, #6b675c); }
.a1-est-card-p { margin-top: 6px; font-size: 0.9375rem; font-weight: 600; color: #2f5a41; }
.a1-est-card:has(input:checked) .a1-est-card-p { color: var(--ink, #0d2a1c); }

/* The price: big, with the reason under it. */
.a1-est-price { margin: 0 0 clamp(28px, 4vw, 44px); padding: clamp(20px, 3vw, 32px); background: var(--ink, #0d2a1c); color: #f6f1e7; border-radius: var(--r, 14px); outline: none; }
.a1-est-price p { margin: 0; }
.a1-est-price-k { font-size: 1.0625rem; color: #cddcd2; }
.a1-est-price-v { margin: 4px 0 8px !important; font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.75rem); font-weight: 600; line-height: 1.05; color: #f6e016; }
.a1-est-price-w { max-width: 62ch; font-size: 1rem; line-height: 1.5; }

/* Fields. */
.a1-est-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.a1-est-field { display: grid; gap: 6px; align-content: start; font-size: 1rem; }
.a1-est-field[hidden] { display: none; }
.a1-est-field > span { font-weight: 600; }
.a1-est :is(input:not([type=radio]):not([type=hidden]), select, textarea) { width: 100%; padding: 12px 14px; font: inherit; color: inherit; background: var(--bg, #f6f1e7); border: 1px solid rgb(13 42 28 / 0.25); border-radius: var(--r-control, 10px); }
.a1-est :is(input:not([type=radio]), select, textarea):focus { border-color: var(--ink, #0d2a1c); box-shadow: inset 0 0 0 1px var(--ink, #0d2a1c); outline: 0; }
.a1-est textarea { margin-top: 0; resize: vertical; }
.a1-est-details { scroll-margin-top: 76px; }
.a1-est-details .a1-est-field:last-child { margin-top: 16px; }
.a1-est .a1-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.a1-est-error { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-control, 10px); background: #fdf1f1; border: 1.5px solid #8f1414; color: #5c0d0d; font-weight: 600; }
.a1-est-error[hidden], .a1-est-more[hidden], .a1-est-done[hidden], .a1-est-form[hidden] { display: none; }
.a1-est-actions { display: grid; gap: 14px; justify-items: start; }
.a1-est .a1-est-send { padding: 16px 28px; font: inherit; font-size: 1.125rem; font-weight: 600; background: #f6e016; color: var(--ink, #0d2a1c); border: 0; border-radius: var(--r-control, 10px); cursor: pointer; }
.a1-est .a1-est-send:hover:not(:disabled) { background: #e5cf00; }
.a1-est .a1-est-send:focus-visible { outline: 3px solid var(--ink, #0d2a1c); outline-offset: 3px; }
.a1-est .a1-est-send:disabled { opacity: 0.7; cursor: progress; }
.a1-est-fine { margin: 0; max-width: 60ch; font-size: 0.9375rem; color: var(--muted, #6b675c); }
.a1-est-note { padding: 16px; background: #fffdf8; border-radius: var(--r, 14px); }

.a1-est-done { display: grid; gap: 12px; padding: clamp(24px, 4vw, 40px); background: #fffdf8; border-radius: var(--r, 14px); box-shadow: var(--lift, none); outline: none; }
.a1-est-done h3 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.a1-est-done p { margin: 0; }
.a1-est-done a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 640px) {
  .a1-est-grid { grid-template-columns: minmax(0, 1fr); }
  .a1-est-cards { grid-template-columns: minmax(0, 1fr); }
  .a1-est-send { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .a1-est-card { transition: none; } }
