/* AVstackr project configuration modal — the Project configuration window's own rules on Project Details.
   ========================================================================
   Built to docs/superpowers/plans/2026-11-13-design-fee-labor-base.md (Task 5). The author-facing shell
   (frame, header, body, notices, panel, field register, segments, footer, buttons, 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 project configuration window uses, every class `pcm-` prefixed: the
   modal element wears `am-modal pcm-modal`, each section's box `am-panel am-grid` (or pcm-labor,
   pcm-legacy). The grid and the affix fields (pcm-grid, pcm-affix, pcm-suffix) moved to author-modal.css as
   am-grid, am-affix and am-affix-unit when the summary lines window became their second user; the Summary lines
   section's own rows are pcm-sl- here. A plain stylesheet rather than a scoped .razor.css, because the window is drawn by the page.
   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-`.

   Type here: the legacy toggle's title 13px/600; the cabling hours sub-heading 13px/600; a summary line's name
   14px/600.
   ======================================================================== */

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

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

.pcm-modal .am-body { gap: 20px; }

/* Load global defaults at the left; Cancel and Save at the right. */
.pcm-modal .am-foot > :first-child { margin-right: auto; }

/* ── sections ───────────────────────────────────────────────────────────── */

/* The labor rates editor beside the union rate. */
.pcm-labor {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

/* The editor's own table scrolls sideways inside its column rather than widening the window. */
.pcm-labor-rates {
    min-width: 0;
    overflow-x: auto;
}

/* The design fee choice lines up with the 40px fields beside it. */
.pcm-modal .am-segments { margin-bottom: 0; }
.pcm-modal .am-segment { height: 40px; }

/* ── summary lines ──────────────────────────────────────────────────────── */

/* The staged lines (ProjectSummaryLinesEditor), one under another, each with its actions and sentence or form. */
.pcm-sl {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pcm-sl-muted {
    font-size: 13px;
    color: var(--app-text-label);
}

.pcm-sl-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border-hairline);
}

.pcm-sl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pcm-sl-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.pcm-sl-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--app-text-strong);
}

.pcm-sl-calc {
    font-size: 12px;
    white-space: nowrap;
    color: var(--app-text-label);
}

.pcm-sl-actions {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ── cable configuration ────────────────────────────────────────────────── */

.pcm-legacy { padding: 0; }

/* The whole bar opens and closes the legacy fields. */
.pcm-legacy-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    color: var(--app-text-data);
    background: transparent;
    border: 0;
    border-radius: calc(var(--am-radius-panel) - 1px);
    cursor: pointer;
}
.pcm-legacy-toggle:hover { background: var(--app-surface-hover); }
.pcm-legacy-toggle:focus-visible {
    outline: 2px solid var(--app-accent-border);
    outline-offset: 2px;
}

.pcm-chevron {
    width: 12px;
    font-size: 11px;
    color: var(--app-text-label);
}

.pcm-legacy-title {
    flex: 1 1 auto;
    font-weight: 600;
    color: var(--app-text-strong);
}

.pcm-legacy-body {
    display: grid;
    row-gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--app-border-hairline);
}

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

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

@media (max-width: 720px) {
    .pcm-labor { grid-template-columns: 1fr; }
}
