/* Controls.css - QA Master Controls register. The subscribable Standards
   catalogue moved to its own tab (modules/Standards, TLP-335). */

/* --- Modal forms (Master Controls modal) --- */

.ctrl-modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ctrl-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3);
}

/* --- standardRefs repeatable picker (Master Controls modal) --- */

.ctrl-refs {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ctrl-refs-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.std-ref-row {
    display: grid;
    grid-template-columns: 1fr 140px auto;
    align-items: center;
    gap: var(--space-2);
}

.ctrl-refs-empty {
    color: var(--text-muted);
    font-size: var(--text-sm);
    padding: var(--space-2) 0;
}

/* --- Master Controls table: derived standard cell --- */

.ctrl-standard {
    font-size: var(--text-sm);
}

.ctrl-ref-more {
    color: var(--text-muted);
    font-size: var(--text-xs);
    margin-left: var(--space-1);
}

/* Master Controls "Status" cell: inline enable toggle + effective-state badge */
.ctrl-status-cell {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

/* Fixed layout pins the fixed-width columns and forces the width-less Control point
   column to absorb only the leftover space, so its name ellipsizes (via .cp-name)
   instead of growing the table past the container. Scoped to this table only. */
.cp-controls-table .data-table {
    table-layout: fixed;
}

/* Control point cell: the flexing requirement name (single-line ellipsis) + a
   small mono control-ID sub-label. Merges the old ID + Requirement columns so the
   table fits with no horizontal scroll. */
.cp-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.cp-id {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-family-mono);
}

/* --- Control Points & Templates workbench (TLP-323) --- */

/* Vertical stack: sub-tab nav -> active sub-tab body.
   Gap-only spacing; no external margins on the children. */
/* The .cp-workbench / .cp-subtab-body / .cp-points-pane wrapper chain is retired: the
   sub-tab bar and the panel are siblings on the page now, so the stack owns the gap and
   the platform one-panel rule (Panel.css) gives the panel the tab height. */

/* Assign-to-departments modal intro line. */
.cp-assign-intro {
    margin: 0 0 var(--space-3);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* --- Set Up seat (TLP-666): selector rows above the hosted QA Obligations page.
   The seat owns the gap between chrome and body; the rows own the gap between
   label and pills. Nothing here carries margin. --- */

.cp-setup-seat {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cp-setup-chrome {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* A wide row (seventeen outlets at Princess Andriana) scrolls sideways inside
   the row, never wraps: the control's sliding highlight is sized to the whole
   control, so a wrapped row would paint it across every line. */
.cp-setup-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    overflow-x: auto;
}

.cp-setup-row .segmented-control {
    flex: 0 0 auto;
}

.cp-setup-label {
    flex: 0 0 auto;
    min-width: 6rem;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
