/* «Повестка» of a date of a meeting (WP31, r2 R2.3): one quiet line a point — the grip, the text, its minutes at the
   right edge and the menu «⋯» — the sum of the plan against the length of the meeting; after the call the title with
   what the points came to, opening them in columns. Colours come only from theme.css tokens. */
.ag { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ag-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ag-sum { font-size: 13px; color: var(--muted-foreground); white-space: nowrap; }
.ag-sum.is-over { color: var(--late); font-weight: 500; }
.ag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ag-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ag-row.is-drag { position: relative; z-index: 1; background: var(--card); box-shadow: var(--w-pop-shadow); }
/* The grip is the handle of a drag: the page does not scroll under a finger that holds it. */
.ag-grip, .ag-grip-gap { width: 20px; flex-shrink: 0; }
.ag-grip { height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted-foreground); cursor: grab; touch-action: none; user-select: none; }
.ag-grip:hover { background: var(--hover); color: var(--foreground); }
.ag-grip:active { cursor: grabbing; }
.ag-grip .w-i { width: 14px; height: 14px; stroke-width: 3; }
.ag-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ag-note { margin-left: 8px; font-size: 12px; color: var(--muted-foreground); }
.ag-who { display: inline-flex; flex-shrink: 0; }
.ag-min { flex-shrink: 0; min-width: 48px; text-align: right; font-size: 13px; color: var(--muted-foreground); white-space: nowrap; }
/* The menu «⋯» shows on hover; a point without one keeps its place, so the minutes stand in one column. */
.ag-more-gap { width: 28px; flex-shrink: 0; }
.ag-more { opacity: .7; }
.ag-row:hover .ag-more, .ag-more:focus-visible, .ag-more[aria-expanded="true"] { opacity: 1; }
.ag-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.ag-edit > .w-input { flex: 1; min-width: 160px; }
.ag-edit-min { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted-foreground); }
.ag-edit-min .w-input { width: 72px; }
/* «+ Добавить пункт»: a quiet line of the list, a field only once it is focused or holds a draft; a pasted list grows
   it, the corner does not. Its button shows when something is written or the field is in use. */
.ag-title { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.ag-source { margin-left: 0; }
.ag-add { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.ag-add-plus { position: absolute; left: 2px; top: 12px; display: inline-flex; color: var(--muted-foreground); pointer-events: none; }
.ag-add-plus .w-i { width: 14px; height: 14px; }
textarea.ag-new.w-input { flex: 1; min-width: 0; height: auto; min-height: 40px; max-height: 160px; padding-block: 9px; padding-left: 24px; resize: none; field-sizing: content; overflow-y: auto; border-color: transparent; background: transparent; box-shadow: none; }
textarea.ag-new.w-input:hover { background: var(--hover); }
textarea.ag-new.w-input:focus { border-color: var(--border-strong); background: var(--background); }
.ag-add .w-btn { flex-shrink: 0; height: 40px; }
.ag-add:not(.has-draft):not(:focus-within) .w-btn { display: none; }
.ag-hint, .ag-limit, .ag-closed, .ag-empty, .ag-hidden-note { margin: 0; font-size: 13px; color: var(--muted-foreground); }
.ag-series { align-self: flex-start; min-height: 32px; }

/* After the call: the title «Повестка» with what its points came to; the whole line is the button that opens them. Its
   chevron stands where the chevrons of the statuses stand: 8px in from the edge of the column. */
.ag-fold-head { margin: 0; }
.ag-fold { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; width: calc(100% + 16px); min-height: 40px; margin: 0 -8px; padding: 4px 16px 4px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--foreground); font: inherit; text-align: left; cursor: pointer; }
.ag-fold:hover { background: var(--hover); }
.ag-tally { justify-self: end; font-size: 13px; font-weight: 400; line-height: 20px; color: var(--muted-foreground); text-align: right; }
.ag-fold-chev { width: 16px; height: 16px; color: var(--muted-foreground); transition: transform .12s; }
.ag-fold[aria-expanded="true"] .ag-fold-chev { transform: rotate(180deg); }
/* The points in the columns of .w-cols (app.css): the text, the minutes, the status. The status column fits the
   longest of the four labels with its dot and chevron, so it has one width whatever the points say; without statuses
   the minutes are the last column. */
.ag-results { --ag-status-w: 8.5em; --w-cols: auto; border-top: 1px solid var(--border); }
.ag-results.has-status { --w-cols: auto var(--ag-status-w); --w-cols-phone: var(--ag-status-w); }
.ag-result { padding: 9px 0; border-bottom: 1px solid var(--border); }
/* The status: its colour, and a dot that tells without the colour whether the call got to the point — filled when it
   did, a ring for «Не дошли»; «—» of no status keeps the place of the dot, so the labels start in one line. */
.ag-status { font-size: 13px; line-height: 20px; white-space: nowrap; }
.ag-status.is-discussed { color: var(--body); }
.ag-status.is-decided { color: var(--success); }
.ag-status.is-postponed { color: var(--late); }
.ag-status.is-missed, .ag-status.is-none { color: var(--muted-foreground); }
.ag-status :is(.w-pick-val, .ag-status-val)::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.ag-status.is-missed :is(.w-pick-val, .ag-status-val)::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.ag-status.is-none :is(.w-pick-val, .ag-status-val)::before { background: transparent; }
.ag-link .w-pick-btn { height: 32px; font-size: 13px; }
.ag-decision { font-size: 13px; line-height: 20px; color: var(--body); overflow-wrap: anywhere; }

@media (max-width: 760px) {
  /* A finger needs 44×44: the grip and «⋯» take it from the height of the row. */
  .ag-grip, .ag-grip-gap { width: 28px; }
  .ag-grip { height: 44px; margin-block: -4px; }
  .ag-more { opacity: 1; }
  .ag-more-gap { width: 44px; }
  .ag-row .ag-more { width: 44px; height: 44px; margin-block: -4px; }
  textarea.ag-new.w-input { min-height: 44px; padding-block: 11px; }
  .ag-add-plus { top: 14px; }
  .ag-add .w-btn { height: 44px; }
  /* The title keeps its chevron at the right; what the points came to goes under it rather than squeezing it. */
  .ag-fold { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; padding-block: 6px; }
  .ag-tally { grid-row: 2; grid-column: 1 / -1; justify-self: start; text-align: left; }
}

/* Row «Повестка» of the meeting window. */
.nm-agenda { display: flex; flex-direction: column; gap: 8px; }
.nm-ag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nm-ag-row { display: flex; align-items: center; gap: 8px; }
.nm-ag-text { flex: 1; min-width: 0; }
.nm-ag-min { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted-foreground); }
.nm-ag-min .w-input { width: 72px; }
.nm-ag-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nm-ag-sum { color: var(--muted-foreground); }
.nm-ag-sum.is-over { color: var(--late); font-weight: 500; }
.nm-ag-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
