/* admin-api-keys.css — AD-KEYS (/admin/api-keys, M6: AK, WF-33). Token-bound
   only (X-R11).

   The table is chrome.css's shared record table and the create panel composes
   admin-editors.css's panel; this file adds only what a key row needs that the
   sibling sheets do not: the mono prefix, the struck
   revoked row, the choice fieldsets, and the show-once key line. */

/* --- Page composition ------------------------------------------------------ */
.adm-keys {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    min-width: 0;
}

.adm-keys__prefix {
    font-family: var(--font-numeric);
    font-size: var(--font-size--1);
}

.adm-keys__scopes,
.adm-keys__product,
.adm-keys__never,
.adm-keys__env {
    color: var(--text-secondary);
    font-size: var(--font-size--1);
}

.adm-keys__env {
    display: block;
}

/* A revoked key stays listed, struck (AK-R04) — and the Status chip beside it
   carries the same fact in words, never color or the strike alone (F-R05). */
.adm-keys__row--revoked .adm-keys__label,
.adm-keys__row--revoked .adm-keys__prefix {
    color: var(--text-secondary);
    text-decoration: line-through;
}

/* Only the active sort column shows a caret; the audit reader has one sortable
   column and never needed an idle state, so it lives here. */
.adm-table--keys .adm-table__caret--idle {
    display: none;
}

.adm-keys__danger {
    color: var(--status-danger-text);
}

/* --- New-key flow (AK-R06) ------------------------------------------------- */
.adm-keys__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
}

.adm-keys__labelinput {
    width: 36ch;
    max-width: 100%;
}

.adm-keys__choices {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    border: 0;
    padding: 0;
    margin: 0;
}

/* The fieldset legend renders like the sibling forms' field labels (fbn's
   treatment): quiet, small, spaced off its options. */
.adm-keys__choices legend {
    padding: 0;
    margin-block-end: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--font-size--1);
}

.adm-keys__replacing {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size--1);
}

/* --- Show-once panel (P2F-R18) ---------------------------------------------
   The key is selectable text beside its copy control — clipboard access can
   fail, and a key that cannot be selected cannot be saved. */
.adm-keys__key {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin: 0;
}

.adm-keys__key code {
    font-family: var(--font-numeric);
    font-size: var(--font-size--1);
    overflow-wrap: anywhere;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-control);
    background-color: var(--surface-page);
}
