/* The Minutes tab's agenda minutes (minutes.js, ADR 0009 section 2): editing in place, the status and revision,
   a time on every line, the length choice and the Issue dialog. The document's table layout is in styles.css. */

/* Concise or detailed: two buttons that read as one control. */
.seg { display: inline-flex; border: 1px solid var(--line, color-mix(in srgb, var(--text) 18%, transparent)); border-radius: 999px; padding: 2px; gap: 2px; background: var(--surface); }
.seg-btn { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: transparent; color: var(--text); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg-btn.on { background: var(--primary); color: #fff; }
.seg-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.populate-options { align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.populate-options .field { margin: 0; display: grid; gap: 4px; }
.length-row { align-items: center; gap: 10px; margin: 8px 0; }

/* Draft, Reviewed, Issued and the revision, above the document. */
.ag-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: -4px 0 16px; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
.ag-status-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ag-status-actions { gap: 8px; flex-wrap: wrap; }
.ag-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.ag-pill.st-draft { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.ag-pill.st-reviewed { background: #FFF1C2; color: #6A4A00; }
.ag-pill.st-issued { background: #D7F5E3; color: #0B5A2E; }
.ag-issues { width: 100%; font-size: 13px; }
.ag-issues ul { margin: 6px 0 0; padding-left: 18px; }
.ag-hint { margin: -8px 0 14px; }

/* Lines: tap the words to change them; the time beside each line plays it. */
.ag-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 4px; }
.ag-words { cursor: text; border-radius: 6px; padding: 0 2px; margin: 0 -2px; }
.ag-words:hover, .ag-words:focus-visible { background: color-mix(in srgb, var(--primary) 10%, transparent); outline: none; }
.chip.ag-time { font-size: 12px; padding: 1px 7px; }
.chip.static { cursor: default; }
.ag-cell-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; display: grid; justify-items: start; gap: 2px; min-height: 22px; width: 100%; }
.ag-cell-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ag-due-date { font-weight: 600; }
.rag.rag-none { background: transparent; color: var(--muted); border: 1px dashed color-mix(in srgb, var(--text) 30%, transparent); font-weight: 600; }
.ag-row.is-closed .ag-words { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent); color: var(--muted); }
.ag-row.is-editing { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.tag.carried { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.tag.closed { background: #D7F5E3; color: #0B5A2E; }
.ag-add { border-top: 1px solid var(--ag-line); padding: 2px 4px; }
.ag-add .btn { font-size: 12.5px; padding: 3px 8px; color: var(--muted); font-weight: 600; }

/* The editor opens under its row, across the table. */
.ag-editor { border-top: 1px solid var(--ag-line); padding: 12px; display: grid; gap: 10px; background: var(--surface); }
.ag-editor .field { margin: 0; display: grid; gap: 4px; }
.ag-editor textarea { width: 100%; font: inherit; font-size: 15px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); background: var(--bg, var(--surface)); color: var(--text); resize: vertical; box-sizing: border-box; }
.ag-editor select, .ag-editor input[type="date"] { font: inherit; font-size: 14.5px; padding: 6px 8px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); background: var(--bg, var(--surface)); color: var(--text); }
.ag-edit-fields { gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ag-edit-actions { gap: 8px; flex-wrap: wrap; align-items: center; }
.ag-said { align-self: center; }
.btn.danger { color: #C62828; }

/* Issue. */
.issue-dialog { max-width: 520px; width: 100%; display: grid; gap: 12px; }
.issue-dialog h3 { margin: 0; }
.issue-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 4px 2px; }
.issue-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.issue-row input { margin-top: 3px; }

@media (max-width: 700px) {
  .ag-status { flex-direction: column; align-items: flex-start; }
}
@media print {
  .ag-time, .ag-add, .ag-hint, .ag-status, .ag-editor { display: none !important; }
  .rag.rag-none { display: none; }
}

/* Find in these minutes (28 October 2026). */
.find-minutes { border: 1px solid var(--line); }
.find-minutes .find-count { white-space: nowrap; }
.agenda-doc mark { background: rgba(255, 204, 0, .45); color: inherit; border-radius: 3px; padding: 0 1px; }
.ag-none { margin: 12px 0 4px; }
@media print { .find-minutes { display: none; } }
