/* The post features: the edited mark (C01), a reshare's note (C12), polls (C15), craft reactions
   (C16), moments in a clip (C18), the caption editor (C10), insights (C17), the Scheduled page
   (C13) and the composer's poll and schedule controls. Everything is static: no animation, no
   inline styles. A poll bar's length is the value of a <progress>. */

/* ---- C01: edited ---- */
.pk-edited { color: var(--pk-faint); }
.pk-edit-post { display: grid; gap: 10px; margin: 8px 0 0; }
.pk-edit-post[hidden] { display: none; }
.pk-edit-post textarea { width: 100%; min-height: 120px; box-sizing: border-box; resize: vertical; }
.pk-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-edit-status:empty { display: none; }
.pk-edit-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-ui); }

/* ---- C12: a reshare's note ---- */
.pk-post-reshare-note { margin: 0; padding: 4px 16px 0; color: var(--pk-ink); font-size: var(--pk-type-body); line-height: 1.4; overflow-wrap: anywhere; }

/* ---- C15: polls ---- */
.pk-poll { display: grid; gap: 8px; margin: 10px 16px 6px; }
.pk-poll-options { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pk-poll-choice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label figure" "bar bar"; align-items: center; gap: 6px 10px; width: 100%; min-height: var(--pk-hit); padding: 10px 14px; border: 1px solid var(--pk-line-strong); border-radius: 12px; background: var(--pk-surface-raised); color: var(--pk-ink); font: 600 var(--pk-type-body)/1.3 var(--fs-font); text-align: left; cursor: pointer; }
.pk-poll-choice:disabled { cursor: default; opacity: 1; }
.pk-poll-choice:focus-visible { outline: var(--pk-focus-width) solid var(--pk-focus); outline-offset: var(--pk-focus-offset); }
.pk-poll-choice[aria-pressed="true"] { border-color: var(--pk-accent-ink); background: color-mix(in srgb, var(--pk-accent) 14%, var(--pk-surface-raised)); }
.pk-poll-label { grid-area: label; min-width: 0; overflow-wrap: anywhere; }
.pk-poll-figure { grid-area: figure; color: var(--pk-muted); font-variant-numeric: tabular-nums; }
.pk-poll-bar { grid-area: bar; display: block; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--pk-surface-sunken); appearance: none; -webkit-appearance: none; overflow: hidden; }
.pk-poll-bar::-webkit-progress-bar { background: var(--pk-surface-sunken); border-radius: 999px; }
.pk-poll-bar::-webkit-progress-value { background: var(--pk-faint); border-radius: 999px; }
.pk-poll-bar::-moz-progress-bar { background: var(--pk-faint); border-radius: 999px; }
.pk-poll-choice[aria-pressed="true"] .pk-poll-bar::-webkit-progress-value { background: var(--pk-accent-ink); }
.pk-poll-choice[aria-pressed="true"] .pk-poll-bar::-moz-progress-bar { background: var(--pk-accent-ink); }
.pk-poll-meta, .pk-poll-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-meta); }
.pk-poll-status:empty { display: none; }
.pk-poll-status a { color: var(--pk-accent-ink); text-decoration: underline; }
.pk-detail .pk-poll { margin-inline: 0; }

/* ---- C16: craft reactions ---- */
.pk-engage-craft svg { width: 20px; height: 20px; flex: none; }
.pk-engage-craft[aria-pressed="true"] { color: var(--pk-accent-ink); }
.pk-craft-panel { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 4px 16px 12px; }
.pk-craft-panel[hidden] { display: none; }
.pk-craft-chip { min-height: 34px; padding: 6px 12px; border: 1px solid var(--pk-line-strong); border-radius: 999px; background: transparent; color: var(--pk-ink); font: 600 var(--pk-type-ui)/1 var(--fs-font); cursor: pointer; }
.pk-craft-chip[aria-pressed="true"] { border-color: var(--pk-accent-ink); background: color-mix(in srgb, var(--pk-accent) 16%, transparent); color: var(--pk-accent-ink); }
.pk-craft-chip:focus-visible { outline: var(--pk-focus-width) solid var(--pk-focus); outline-offset: 2px; }
.pk-craft-status { flex-basis: 100%; margin: 0; color: var(--pk-error); font-size: var(--pk-type-meta); }
.pk-craft-status:empty { display: none; }
.pk-craft-status a { color: var(--pk-accent-ink); text-decoration: underline; }
.pk-craft-summary { margin: 0; padding: 0 16px 10px; color: var(--pk-muted); font-size: var(--pk-type-meta); }

/* ---- C18: moments in a clip ---- */
.pk-moment-chip { min-height: 24px; padding: 2px 10px; border: 1px solid var(--pk-info-line); border-radius: 999px; background: var(--pk-info-tint); color: var(--pk-info); font: 700 var(--pk-type-meta)/1.2 var(--fs-font); font-variant-numeric: tabular-nums; cursor: pointer; }
.pk-moment-chip:focus-visible { outline: var(--pk-focus-width) solid var(--pk-focus); outline-offset: 2px; }
.pk-moment-form { display: grid; gap: 8px; margin: 12px 16px; padding: 12px 14px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface); }
.pk-moment-lede { margin: 0; color: var(--pk-ink); font: 700 var(--pk-type-ui)/1.2 var(--fs-font); }
.pk-moment-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pk-moment-time { width: 96px; }
.pk-moment-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-meta); }
.pk-moment-status:empty { display: none; }
.pk-moment-status a { color: var(--pk-accent-ink); text-decoration: underline; }
.pk-moment-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }

/* ---- C10: captions ---- */
.pk-captions { display: grid; gap: 10px; margin: 12px 16px; padding: 14px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface); }
.pk-captions[hidden] { display: none; }
.pk-captions h2, .pk-captions h3 { margin: 0; font-size: var(--pk-type-body); }
.pk-captions-clip { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--pk-line); }
.pk-captions-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pk-captions-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pk-captions-none { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-ui); }
.pk-captions-add { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.pk-captions-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-ui); }
.pk-captions-status:empty { display: none; }

/* ---- C17: insights ---- */
.pk-insights { margin: 10px 16px; padding: 10px 14px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface); }
.pk-insights > summary { cursor: pointer; font: 700 var(--pk-type-ui)/1.2 var(--fs-font); }
.pk-insights-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; }
.pk-insights-row { display: flex; justify-content: space-between; gap: 12px; }
.pk-insights-row dt { color: var(--pk-muted); }
.pk-insights-row dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.pk-insights-row small { color: var(--pk-faint); font-weight: 400; }
.pk-insights-note { margin: 10px 0 0; color: var(--pk-muted); font-size: var(--pk-type-meta); }
.pk-insights-page, .pk-scheduled-page { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; padding: 16px; }
.pk-insights-posts, .pk-scheduled-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-insights-post, .pk-scheduled-item { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface); }
.pk-insights-title { color: var(--pk-ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.pk-insights-line { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-ui); }

/* ---- C13: scheduled ---- */
.pk-scheduled-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--pk-muted); font-size: var(--pk-type-meta); }
.pk-scheduled-state { padding: 1px 9px; border: 1px solid var(--pk-line-strong); border-radius: 999px; color: var(--pk-ink); font-weight: 700; }
.pk-scheduled-state--failed { border-color: var(--pk-error-line); color: var(--pk-error); }
.pk-scheduled-text { overflow-wrap: anywhere; }
.pk-scheduled-text--none { color: var(--pk-muted); }
.pk-scheduled-error { margin: 0; color: var(--pk-error); font-size: var(--pk-type-ui); }
.pk-scheduled-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pk-scheduled-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-meta); }
.pk-scheduled-status:empty { display: none; }

/* ---- composer: poll and schedule ---- */
.pk-poll-fields { display: grid; gap: 8px; margin: 8px 0; }
.pk-composer-poll .pk-field, .pk-composer-schedule .pk-field { max-width: 360px; }

/* ---- quote dialog ---- */
.pk-quote textarea { width: 100%; box-sizing: border-box; margin: 8px 0; resize: vertical; }
.pk-quote-status:empty { display: none; }

/* ---- C12: notes on reshares, for the author ---- */
.pk-note-report { margin-left: 8px; padding: 0; border: 0; background: transparent; color: var(--pk-muted); font: 600 var(--pk-type-meta)/1.2 var(--fs-font); text-decoration: underline; cursor: pointer; }
.pk-note-report:focus-visible { outline: var(--pk-focus-width) solid var(--pk-focus); outline-offset: 2px; }
.pk-reshare-notes { display: grid; gap: 10px; margin: 10px 16px; padding: 12px 14px; border: 1px solid var(--pk-line); border-radius: 12px; background: var(--pk-surface); }
.pk-reshare-notes h2 { margin: 0; font-size: var(--pk-type-body); }
.pk-reshare-notes ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-reshare-note-item p { margin: 0 0 6px; overflow-wrap: anywhere; }
.pk-reshare-note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-reshare-notes-status:empty { display: none; }
.pk-reshare-notes-status { margin: 0; color: var(--pk-muted); font-size: var(--pk-type-meta); }
