/* quote — eng/field-video estimator. tokens + var(--accent) only; no hardcoded section color. */

/* step 2 sub-line under the service heading (plain, not a boxed callout) */
.q-notice {
    color: var(--dim);
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
}
.q-notice strong { color: var(--accent); font-weight: 500; }

/* ── step flow: (1) chooser, (2) form ──  NB: use .q-stage, NOT .q-step (that's the +/- stepper widget) */
.q-stage[hidden] { display: none !important; }

/* step 1 — pick a service. selectable cards (no heading) */
.q-choose-list { display: flex; flex-direction: column; gap: 0.7rem; max-width: 38rem; }
.q-choice {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.08rem 1rem;
    width: 100%;
    text-align: left;
    font-family: var(--mono);
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: border-color 0.12s ease, transform 0.06s ease;
}
.q-choice:hover { border-color: var(--accent); }
.q-choice:active { transform: translateY(1px); }
.q-choice-name { grid-column: 1; grid-row: 1; color: var(--fg); font-size: 1rem; font-weight: 500; transition: color 0.12s ease; }
.q-choice:hover .q-choice-name { color: var(--accent); }
.q-choice-note { grid-column: 1; grid-row: 2; color: var(--dim); font-size: 0.82rem; line-height: 1.45; }
.q-choice-tag {
    grid-column: 2; grid-row: 1 / 3;
    align-self: center; justify-self: end;
    color: var(--dim); font-size: 0.68rem;
    letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap;
}
.q-choice-tag.is-instant { color: var(--accent); }
/* localhost inline editor only: give an empty description a clickable hint (production renders nothing) */
body.fw-editable .q-choice-note:empty::before { content: 'double-click to add a description'; color: var(--dim); opacity: 0.5; font-style: italic; }

/* step 2 — header: a back link on its own line, then the service name as a heading */
.q-formhead { margin-bottom: 1.25rem; }
.q-back {
    display: inline-block;
    font-family: var(--mono); font-size: 0.8rem; color: var(--dim);
    background: transparent; border: 0; padding: 0; margin-bottom: 0.6rem;
    cursor: pointer; transition: color 0.12s ease;
}
.q-back:hover { color: var(--accent); }
.q-formhead-name { color: var(--fg); font-size: 1.3rem; font-weight: 500; line-height: 1.2; outline: none; }

/* layout: inputs | output */
.q-grid {
    display: grid;
    grid-template-columns: 1fr 22rem;
    gap: 1.75rem;
    align-items: start;
}

/* ── form ── */
.q-form, .q-intake { display: flex; flex-direction: column; gap: 1.5rem; }
/* class beats the UA [hidden] rule on equal specificity, so re-assert it explicitly */
.q-form[hidden], .q-intake[hidden], .q-eng-out[hidden], .q-req-out[hidden] { display: none !important; }

/* per-project intake fields */
.q-intake .q-field + .q-field { margin-top: 0.9rem; }
.q-field textarea { line-height: 1.55; resize: vertical; min-height: 6.5rem; }
.q-field textarea::placeholder, .q-field input::placeholder { color: var(--dim); opacity: 0.7; }

.q-fs {
    border: 1px solid var(--line);
    padding: 0.9rem 1rem 1rem;
}
.q-fs[hidden] { display: none; }
.q-fs legend {
    color: var(--dim);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 0.4rem;
}

.q-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    min-height: 2.1rem;
}
.q-row[hidden] { display: none; }
.q-row > label { color: var(--fg); font-size: 0.92rem; }
.q-sub, .q-row .q-sub { color: var(--dim); font-size: 0.8rem; }

/* segmented control (zone) */
.q-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.q-seg-btn {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--dim);
    background: transparent;
    border: 1px solid var(--line);
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease;
}
.q-seg-btn:hover { color: var(--fg); border-color: var(--dim); }
.q-seg-btn.is-on {
    color: var(--accent);
    border-color: var(--accent);
}

/* stepper */
.q-step {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--line);
}
.q-step-btn {
    font-family: var(--mono);
    font-size: 1rem;
    line-height: 1;
    color: var(--dim);
    background: transparent;
    border: none;
    width: 1.9rem;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}
.q-step-btn:hover { color: var(--accent); background: rgba(255, 255, 255, 0.03); }
.q-step input {
    width: 3rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.92rem;
    color: var(--fg);
    background: var(--bg);
    border: none;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.4rem 0;
    -moz-appearance: textfield;
}
.q-step input::-webkit-outer-spin-button,
.q-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* select */
.q-row select {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}
.q-row select:hover { border-color: var(--dim); }

/* toggle (checkbox) */
.q-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0;
    cursor: pointer;
    user-select: none;
}
.q-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.q-tbox {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    position: relative;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.q-toggle:hover .q-tbox { border-color: var(--dim); }
.q-toggle input:checked + .q-tbox {
    border-color: var(--accent);
    background: var(--accent);
}
.q-toggle input:checked + .q-tbox::after {
    content: '';
    position: absolute;
    left: 0.32rem;
    top: 0.12rem;
    width: 0.28rem;
    height: 0.55rem;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.q-toggle input:focus-visible + .q-tbox { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.q-tlabel { color: var(--fg); font-size: 0.92rem; }

/* ── output panel ── */
.q-out {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 1.1rem 1.1rem 1.2rem;
    position: sticky;
    top: 1.5rem;
}
.q-total-wrap { border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; margin-bottom: 0.9rem; }
.q-total-label {
    color: var(--dim);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.q-total {
    color: var(--accent);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0.1rem 0 0.15rem;
    font-variant-numeric: tabular-nums;
}
.q-total-note { color: var(--dim); font-size: 0.78rem; }

/* request panel (non-eng services — no number, quoted over email) */
.q-req-head {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0.12rem 0 0.15rem;
}
.q-req-body { color: var(--dim); font-size: 0.85rem; line-height: 1.6; margin: 0.9rem 0 0; }

/* breakdown */
.q-break { display: flex; flex-direction: column; gap: 0.9rem; min-height: 2rem; }
.q-empty { color: var(--dim); font-size: 0.85rem; padding: 0.3rem 0; }

.q-grp-head {
    display: flex;
    justify-content: space-between;
    color: var(--dim);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-bottom: 0.25rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px dotted var(--line);
}
.q-grp-sum { color: var(--fg); font-variant-numeric: tabular-nums; }
.q-li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
    padding: 0.12rem 0;
}
.q-li-label { color: var(--fg); }
.q-li-amt { color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* deposit / balance split */
.q-deposit { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.9rem; }
.q-deposit:empty { display: none; }
.q-dep-row { display: flex; justify-content: space-between; align-items: baseline; }
.q-dep-k { color: var(--fg); font-size: 0.9rem; }
.q-dep-v { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; }
.q-dep-note { color: var(--dim); font-size: 0.75rem; margin: 0.1rem 0 0.5rem; }
.q-dep-bal .q-dep-k, .q-dep-bal .q-dep-v { color: var(--dim); font-weight: 400; font-size: 0.85rem; }

/* send */
.q-send {
    width: 100%;
    margin-top: 1.1rem;
    font-family: var(--mono);
    font-size: 0.92rem;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.q-send:hover { background: var(--accent); color: var(--bg); }
.q-fineprint { color: var(--dim); font-size: 0.74rem; line-height: 1.5; margin-top: 0.6rem; }

/* your details + send states */
.q-contact { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.1rem; }
.q-field { display: flex; flex-direction: column; gap: 0.25rem; }
.q-field > span { color: var(--dim); font-size: 0.82rem; letter-spacing: 0.04em; }
.q-field input, .q-field textarea {
    width: 100%; box-sizing: border-box;
    font-family: var(--mono); font-size: 0.95rem; color: var(--fg);
    background: var(--bg); border: 1px solid var(--line); padding: 0.6rem 0.7rem;
}
.q-field input:hover, .q-field textarea:hover { border-color: var(--dim); }
.q-field input:focus-visible, .q-field textarea:focus-visible { outline: none; border-color: var(--accent); }
.q-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.q-turnstile { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }   /* invisible until the check runs on send */
.q-ts-note { color: var(--dim); font-size: 0.66rem; line-height: 1.5; margin-top: 0.5rem; }
.q-ts-note a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }
.q-ts-note a:hover { color: var(--accent); }
.q-send[disabled] { opacity: 0.55; cursor: default; }
.q-send[disabled]:hover { background: transparent; color: var(--accent); }
.q-send-status { color: var(--dim); font-size: 0.78rem; line-height: 1.5; margin-top: 0.5rem; min-height: 1rem; }
.q-send-status.is-bad { color: var(--c-orange); }
.q-sent {
    margin-top: 1.1rem; padding: 0.6rem 0.8rem;
    border: 1px solid var(--accent); color: var(--accent);
    font-size: 0.9rem; line-height: 1.5;
}

/* sticky live-total bar (mobile only) — keeps the number visible while editing.
   only meaningful for the eng estimator; hidden for the per-project request flow. */
.q-sticky { display: none; }
#quote-root:not([data-service="eng"]) .q-sticky { display: none !important; }

/* ── mobile ── */
@media (max-width: 700px) {
    .q-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .q-out { position: static; }
    .q-row { flex-wrap: wrap; }
    #quote-root { padding-bottom: 4.5rem; }
    .q-sticky {
        display: flex; align-items: center; gap: 0.8rem;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: rgba(10, 10, 10, 0.95); border-top: 1px solid var(--accent);
        padding: 0.6rem 1rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    }
    .q-sticky-l { color: var(--dim); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
    .q-sticky-v { color: var(--accent); font-size: 1.3rem; font-weight: 500; font-variant-numeric: tabular-nums; flex: 1 1 auto; }
    .q-sticky-send { font: inherit; font-size: 0.85rem; color: var(--bg); background: var(--accent); border: 0; padding: 0.45rem 0.9rem; cursor: pointer; }
}
