/* AVstackr proposal modal — the Generate proposal window's own rules on Project Details.
   ========================================================================
   Built to docs/superpowers/specs/2026-11-07-proposal-modal-visual-refresh-design.md (D2, D3, D5). The
   author-facing shell (frame, header, body, notices, panel, field register, footer, buttons, links,
   badges, chips and numbers) is shared with the executive summary and estimate 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, and it loads before this one.
   This file holds only what the proposal window uses, every class `prop-` prefixed: the modal
   element wears `am-modal prop-modal`, each live link `am-panel prop-live`. A plain stylesheet rather
   than the component's old scoped .razor.css, so the window sits on the same shell as its siblings.

   Promotion rule: a class used by a second author-facing window moves to author-modal.css as `am-`;
   a class only this window uses stays here under `prop-`. Rules here may reach shared classes for
   this window alone (.prop-modal .am-notice, .prop-live .am-sig-form). The disabled template select's
   rule moved to author-modal.css when the certified system window became the second window with a
   field that can be disabled.

   Colours are --app-* tokens only; no literal colours and no important flags. The preview iframe sits
   on --app-paper, a printed document's page, declared in themes/theme-base.css. Radii come from the
   --am-radius-* steps: the choice cards take the button step, the preview frames the panel step.

   Type here: output titles 14px/600 and their descriptions 13px/400; the Will produce sentence, the
   link meta line, the superseded note and the shared stamps 13px/400; the superseded label 13px/500;
   document names 14px/600 in a live panel and 14px/400 in the table; table headings and the Locked
   mark 12px/500; views 13px. Sentence case throughout: nothing here sets a text transform or a
   tracking, and the monospace stack is for numbers and the link URLs only.
   ======================================================================== */

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

/* The preview frame and the five-column table need the width; the shared max-width bounds it. */
.prop-modal { width: 940px; }

/* The spacing between the three sections. */
.prop-modal .am-body { gap: 28px; }

/* ── new document ───────────────────────────────────────────────────────── */

/* Template beside Output. */
.prop-new-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* Full template / Tables only. */
.prop-output-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.prop-output {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 10px 12px;
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-btn);
    cursor: pointer;
}
.prop-output:hover { border-color: var(--app-border-strong); }
/* The chosen card, as the estimate's chosen segment: raised, with the strong border. */
.prop-output.is-on {
    background: var(--app-surface-raised);
    border-color: var(--app-border-strong);
}

.prop-output-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--app-text-strong);
}

.prop-output-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--app-text-label);
}

/* What the output produces, then Generate. */
.prop-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--app-border-hairline);
}

.prop-will-produce {
    font-size: 13px;
    font-weight: 400;
    color: var(--app-text-label);
}

/* The error notice stays inside its section, under the action row. */
.prop-modal .am-notice { margin-top: 16px; }

/* ── generated document ─────────────────────────────────────────────────── */

/* A full template's preview: the themed document on its own white page, in both modes. */
.prop-preview-frame {
    display: block;
    width: 100%;
    height: 460px;
    background: var(--app-paper);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-panel);
}

/* A tables-only preview: the plain tables in a scrolling box. */
.prop-preview-plain {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    color: var(--app-text-data);
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    border-radius: var(--am-radius-panel);
}

/* Copy text, Customer link, Word, HTML, PDF and the free-tier allowance. */
.prop-exports {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

/* Beside Word on a free tier. */
.prop-locked {
    font-size: 12px;
    font-weight: 500;
    color: var(--app-status-warn);
}

.prop-allowance { display: inline-flex; }

/* A link's URL and its Copy button. */
.prop-readout-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

/* The URL wraps onto a second line rather than being cut. */
.prop-url {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}

/* ── customer links ─────────────────────────────────────────────────────── */

.prop-live + .prop-live { margin-top: 12px; }
.prop-live.is-revoked { opacity: 0.6; }

/* Name and meta left, status chip right. */
.prop-live-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.prop-doc-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--app-text-strong);
    overflow-wrap: anywhere;
}

.prop-doc-meta {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--app-text-label);
}

/* Signers left, the link's actions right. */
.prop-live-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border-hairline);
}

.prop-signers {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.prop-link-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* The signature form under the panel's foot. */
.prop-live .am-sig-form { margin-top: 12px; }

/* ── superseded links ───────────────────────────────────────────────────── */

/* The disclosure: chevron, label and note. */
.prop-superseded-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--app-border-hairline);
    cursor: pointer;
}

.prop-caret {
    font-size: 12px;
    color: var(--app-text-label);
}

.prop-superseded-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--app-text-label);
}

.prop-superseded-note {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--app-text-label);
}

.prop-table { display: block; }

/* Document, Shared, Status, Views, Link. */
.prop-tr {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 0.95fr 1.35fr 0.5fr 88px;
    gap: 12px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--app-border-hairline);
}
.prop-tr:not(.prop-th):hover { background: var(--app-surface-hover); }

.prop-th {
    font-size: 12px;
    font-weight: 500;
    color: var(--app-text-label);
}
.prop-th > span:nth-child(4),
.prop-th > span:nth-child(5) { text-align: right; }

/* A long document name wraps rather than being cut. */
.prop-td-doc {
    min-width: 0;
    font-size: 14px;
    color: var(--app-text-data);
    overflow-wrap: anywhere;
}

.prop-td-meta {
    font-size: 13px;
    color: var(--app-text-label);
}

/* The chip keeps its own width in the grid cell. */
.prop-td-status { justify-self: start; }

.prop-td-views {
    font-size: 13px;
    color: var(--app-text-data);
    text-align: right;
}

.prop-td-link { justify-self: end; }

/* ── focus ──────────────────────────────────────────────────────────────── */

.prop-output:focus-visible {
    outline: 2px solid var(--app-accent-border);
    outline-offset: 2px;
}

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

@media (max-width: 720px) {
    .prop-new-grid { grid-template-columns: 1fr; }
    .prop-tr { grid-template-columns: minmax(0, 1.4fr) 1fr 0.5fr 72px; }
    .prop-tr > span:nth-child(3) { display: none; }
}
