/* ═══════════════ PLAYER ATTENTION FLAGS (prefix at-) ═══════════════
   The Flag column on Squad Assessment, its popover with the reasons and the
   two verdict pills, the flag list on the Individual page, and the admin
   weekly-review sheet. Composed from the ladder tokens; no accent fills. */

.player-table td.at-cell {
    text-align: center;
}

/* The word in the column: Review in primary ink, Watch and Data quieter.
   Silence is the default; a word is news. */
.at-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-system);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.at-flag.at-watch .at-word { color: var(--text-secondary); }
.at-flag.at-data .at-word { color: var(--text-tertiary); }
.at-flag.at-rtp .at-word { color: var(--text-secondary); }
.at-flag.at-muted .at-word { color: var(--text-disabled); }
.at-word.is-muted { color: var(--text-disabled); }
.at-word.is-rtp { color: var(--text-secondary); }
.at-flag:hover .at-word { color: var(--text-primary); }

/* The flagless cell: a quiet plus on the row's hover or focus, same popover. */
.at-flag.at-none {
    opacity: 0;
    color: var(--text-tertiary);
    transition: opacity 0.12s;
}

.player-table tr:hover .at-flag.at-none,
.at-flag.at-none:focus-visible,
.at-flag.at-none[aria-expanded="true"] { opacity: 1; }

.at-flag.at-none svg { display: block; }

.at-flag:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

.at-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--ink-wash-strong);
    color: var(--text-primary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* ── Popover: the reasons and nothing else, then Useful / Not useful ── */
.at-pop {
    position: fixed;
    z-index: 120;
    width: 480px;
    max-width: calc(100vw - 16px);
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-pop);
    color: var(--text-primary);
    font-family: var(--font-system);
    white-space: normal;
    text-align: left;
    overflow-y: auto;
}

.at-pop[hidden] { display: none; }

.at-pop-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--ink-line);
}

.at-pop-head b { font-size: 0.85rem; font-weight: 700; }
.at-pop-head .at-pos { font-size: 0.72rem; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.3px; }

.at-pop-head .at-word,
.at-ir .at-word,
.at-item .at-word {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.at-pop-head .at-word { margin-left: auto; }

.at-mute {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-line);
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.at-mute .at-pick { margin-top: 0; }
.at-mute .ac-btn { margin-left: auto; }
.at-word.is-watch { color: var(--text-secondary); }
.at-word.is-data { color: var(--text-tertiary); }

.at-block + .at-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-line);
}

.at-today,
.at-injury-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-line);
}

.at-injury {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ink-line);
}

.at-injury strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.at-injury small,
.at-note-line small {
    display: block;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.at-note-line {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

.at-note-line + .at-note-line { border-top: 1px solid var(--ink-line); }

.at-block-k {
    margin-bottom: 4px;
    color: var(--text-tertiary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.at-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: start;
    padding: 4px 0;
}

.at-row + .at-row { border-top: 1px solid var(--ink-line); }
.at-row .at-actions { padding-top: 1px; }
.at-row .at-pick { grid-column: 1 / -1; }

.at-line {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.78rem;
    line-height: 1.4;
    text-wrap: pretty;
}


.at-line small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.at-line small.is-returned { color: var(--text-tertiary); }
.at-line small.is-answered { color: var(--text-tertiary); }

.at-foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.at-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

/* The pick row: reason (or mute-length) pills in the same pill idiom as
   Useful / Not useful, then the optional note and Send on one line. */
.at-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 8px;
}

.at-pick .ac-btn { flex: 0 0 auto; }
.at-mute + .at-pick { padding-bottom: 0; }

.at-note {
    flex: 1 1 200px;
    min-width: 0;
    margin-top: 8px;
}

.at-note .hub-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 26px;
    padding: 3px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 500;
}

.at-quiet {
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

/* Header state: computed time in the title; a word only when something is off. */
.at-th { display: inline-flex; align-items: baseline; gap: 6px; }
.at-th-state {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Expected data lines: a shared note, not a flag. */
.at-expected {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 0.7rem;
}
.at-expected span { flex: 1 1 auto; min-width: 0; }
.at-expected .ac-btn { flex: 0 0 auto; }
.at-pop-head .ac-btn { margin-left: 8px; }

/* ── Individual page: the player's open and quiet flags under the name ── */
.at-ir {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.at-ir[hidden] { display: none; }
.at-ir .at-word { font-size: 0.66rem; }

.at-empty {
    display: flex;
    align-items: center;
    min-height: 26px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-line);
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* The empty-state row already supplies the divider before the feedback row. */
.at-empty + .at-mute {
    margin-top: 0;
    padding-top: 10px;
    border-top: 0;
}
