/* AVstackr estimate modal — the Generate estimate window's own rules on Project Details.
   ========================================================================
   Built to docs/superpowers/specs/2026-11-06-estimate-modal-visual-refresh-design.md (D2, D5). The
   author-facing shell (frame, header, body, notices, panel, field register, saved view, footer,
   buttons, links, badges, chips and numbers) is shared with the other author-facing windows in
   author-modal.css, as `am-` classes; that file carries the register, the colour token table and the
   --am-radius-* steps declared on .am-modal, which the rules here use. This file holds only what the
   estimate window uses, every class `est-` prefixed: the modal element wears `am-modal est-modal`,
   the address boxes `am-panel est-panel`. A plain stylesheet rather than a scoped .razor.css, because
   the window is drawn by the page and the EstimateFormSections component together. Colours are
   --app-* tokens only; no literal colours and no important flags.

   Promotion rule: a class used by a second author-facing window moves to author-modal.css as `am-`.
   The field register (sections, labels, inputs, selects, the textarea, field notes, the readout and
   the signature rows) now lives in author-modal.css, moved there when the proposal window became the
   third window to need it (docs/superpowers/specs/2026-11-07-proposal-modal-visual-refresh-design.md,
   D4). The saved view (the saved-estimates row, the saved panel, the number head, the facts list and
   the action row) moved there too, as am-saved-row, am-saved-panel, am-saved-head, am-facts and
   am-actions, when the invoice window became the second window to show a saved document
   (docs/superpowers/specs/2026-11-07-invoice-modal-visual-refresh-design.md, D4). The segments moved
   there as am-segments and am-segment when the project configuration window became the second window
   with a segmented choice (docs/superpowers/plans/2026-11-13-design-fee-labor-base.md, Task 5). One rule
   here reaches a shared class for this window alone: the customer picker's gap (.am-select.is-customer).

   Type here: the required marker 13px in the label colour; panel titles 13px/600.
   ======================================================================== */

/* ── shell ──────────────────────────────────────────────────────────────── */

/* The shared rule's max-width: calc(100vw - 48px) already bounds the width on small screens. */
.est-modal { width: 880px; }

/* The spacing between the body's blocks: the saved-estimates row, the three sections, the saved
   panel. No block adds a margin of its own on top of it. */
.est-modal .am-body { gap: 24px; }

/* ── fields ─────────────────────────────────────────────────────────────── */

/* "(required)" after a required label, in the label's colour. */
.est-required { color: var(--app-text-label); }

/* The customer picker, with the gap above the readout that the old customer select kept. */
.am-select.is-customer { margin-bottom: 10px; }

/* ── estimate row and addresses ─────────────────────────────────────────── */

/* Title, Date, Valid for. */
.est-row-estimate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 184px 184px;
    gap: 12px;
}

/* Bill to beside Ship to. */
.est-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

/* The address boxes take am-panel's box; a long unbroken value (an email, a link) wraps inside them
   rather than widening them. */
.est-panel { min-width: 0; }

.est-panel-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--app-text-strong);
}

/* The manual address fields, one under another. */
.est-manual {
    display: grid;
    row-gap: 12px;
}

/* City, State, ZIP. */
.est-csz {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px 112px;
    gap: 12px;
}

/* Email beside Phone. */
.est-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Terms, and Custom terms beside it when Custom… is picked. */
.est-terms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 12px;
    margin-top: 16px;
}

/* A stored value outside the list, in full under the select (a closed select cuts it off). */
.est-terms-full { overflow-wrap: anywhere; }

/* ── narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 720px) {
    .est-row-estimate,
    .est-address-grid,
    .est-terms { grid-template-columns: 1fr; }
}
