/* ===========================================================================
   Checklist module - CSS that arrives with the module.
   ---------------------------------------------------------------------------
   The bulk of the .checklist-* family lives in the Web project's css/norian-new.css, from the
   original prototype port. New rules the module needs go here instead, so a change to the app is one
   manifest rather than a whole-file replacement of a stylesheet the app does not own.

   Everything is scoped under .norian-frame, which only the new chrome applies - the classic frame
   never matches these selectors and keeps its plain MudBlazor rendering.

   Colours use the semantic tokens (redefined inside .norian-dark), never the raw palette steps: a
   raw step is a dark-mode bug that looks fine in whichever theme you happened to preview.
   =========================================================================== */

/* --- Hub row: delete action shares the status cell, so the grid keeps five columns. --- */

.norian-frame .checklist-hub__row-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.norian-frame .checklist-hub__row-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease;
}

.norian-frame .checklist-hub__row-delete:hover,
.norian-frame .checklist-hub__row-delete:focus-visible {
    color: var(--danger);
    border-color: var(--danger);
}

/* --- Field card: the draft button sits beside the textarea, not under it. ---
   A button row per field cost more vertical space than the textarea it belonged to, and Part 1 has
   twenty-five of them. */

.norian-frame .checklist-field-card__body {
    display: flex;
    align-items: stretch;   /* the button matches the textarea's height */
    gap: 8px;
}

.norian-frame .checklist-field-card__body .checklist-field-card__textarea {
    flex: 1 1 auto;
    min-width: 0;           /* without this a flex item refuses to shrink below its content width */
    margin: 0;
}

.norian-frame .checklist-field-card__draft-slot {
    display: flex;
    flex: 0 0 96px;         /* narrow on purpose - the label wraps onto two or three lines */
}

.norian-frame .checklist-field-card__draft-btn--side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 6px 8px;
    white-space: normal;    /* the default nowrap is what would force the button wide */
    line-height: 1.15;
    text-align: center;
    font-size: 12px;
}

.norian-frame .checklist-field-card__draft-btn--side:disabled {
    opacity: .5;
    cursor: not-allowed;
}
