/* The hub's Agenda section (hub/agenda.js): this week's agendas, the ones coming up and the earlier
   ones, one row each with the Events page's date block; and the editor dialog. Colors come from
   the tokens in app.css. */

.ag-group + .ag-group, .ag-none + .ag-group { margin-top: 24px; }
.ag-group-title { margin: 0 0 10px; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ag-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; }
.ag-row-main { min-width: 0; }
.ag-row-title { margin: 0; font-weight: 750; font-size: 17px; overflow-wrap: anywhere; }
.ag-row-when { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.ag-row-preview { margin: 6px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-row-preview.is-empty { font-style: italic; }
.ag-row-actions { display: flex; gap: 8px; }
.ag-none { padding: 16px 18px; }
.ag-none-title { margin: 0 0 4px; font-weight: 750; }
.ag-none p:last-child { margin: 0; color: var(--muted); }
.ag-more { margin-top: 10px; }

/* The editor. The conflict box and its note look like the event editor's (hub-events.css). */
.ag-conflict { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.ag-conflict h3 { margin: 0 0 6px; font-size: 15px; }
.ag-conflict p { margin: 0 0 10px; font-size: 14px; }
.ag-conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* The other officer's text when both changed it, to read and copy before choosing, and after Use their
   version this officer's own dropped text, closed, to copy from (44px tall summary). */
.ag-theirs, .ag-mine { margin: 0 0 10px; font-size: 14px; }
.ag-mine { margin-bottom: 12px; }
.ag-theirs > summary, .ag-mine > summary { padding: 11px 0; line-height: 22px; font-weight: 650; cursor: pointer; }
.ag-theirs pre, .ag-mine pre { margin: 0; max-height: 240px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); font-size: 14px; }
.ag-edit-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.ag-same-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--warn); font-size: 14px; }
.ag-same-day p { margin: 0; flex: 1 1 240px; }
textarea.ag-text { min-height: 260px; font-size: 16px; line-height: 1.5; }
.ag-public { margin: 4px 0 0; }
.hub-dialog-actions .ag-delete { margin-right: auto; }

@media (max-width: 759px) {
  .ag-row { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 12px; }
  .ag-row-actions { grid-column: 1 / -1; }
  .ag-row-actions .btn, .ag-conflict-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .ag-same-day .btn { min-height: 44px; }
  .btn.ag-more { min-height: 44px; } /* two classes, so it beats .btn.small (app.css) */
  .ag-edit-row { grid-template-columns: minmax(0, 1fr); }
}
