/* Quick questions to the group (public/polls.js). Colours come from the
   trip's look through the same tokens as everything else, so a beach trip's
   chosen answer is beach ink, not a colour of its own. */

.polls { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.polls:empty { display: none; }
.polls > .sec-head { margin-bottom: 0; }

.poll { padding: var(--s3) 0; border-top: 1px solid var(--rule-soft); display: grid; gap: var(--s2); }
/* The heading's own rule is enough over the first question. */
.poll:not(.poll ~ .poll) { border-top: 0; }
.poll h3 { font-family: var(--display); font-size: 20px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.poll > .meta { font-size: 14px; margin: 0; }

.poll-options { display: grid; gap: var(--s2); }

/* Each answer is a full-width button a thumb can hit, with the count laid
   behind it as a bar once you can see the counts. */
button.poll-option {
  position: relative;
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; min-height: 48px;
  padding: 10px 14px;
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  box-shadow: none;
  font-size: 15.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  overflow: hidden;
}
button.poll-option:hover:not([disabled]) { border-color: var(--ink); }
button.poll-option[disabled] { cursor: default; opacity: 1; }
button.poll-option.mine { border-color: var(--accent); border-width: 2px; font-weight: 650; }
button.poll-option.mine .poll-label::before { content: '✓ '; color: var(--accent); }
button.poll-option.won { border-color: var(--ink); font-weight: 650; }

.poll-bar {
  position: absolute; inset: 0 auto 0 0;
  background: var(--accent-soft);
  transition: width 240ms var(--ease, ease);
  z-index: 0;
}
.poll-label { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.poll-n { position: relative; z-index: 1; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }

.poll-who { display: grid; gap: 2px; }
.poll-who .meta, .poll-hint { font-size: 13.5px; line-height: 1.45; margin: 0; }

/* The host's view: set off by a rule in the accent, as with who would swap
   what on the plan. */
.poll-host { border-left: 3px solid var(--accent-line, var(--accent)); padding-left: var(--s3); display: grid; gap: var(--s1); }
.poll-host .meta { font-size: 13.5px; margin: 0; }
.poll-host .button-row { margin-top: 0; }

.poll.closed h3 { color: var(--ink-2); }

.poll-past > summary { cursor: pointer; color: var(--ink-3); font-size: 14px; padding: var(--s2) 0; }

/* The host's editor: one card a suggested question. */
.poll-asking { display: grid; gap: var(--s3); }
.poll-edit {
  display: grid; gap: var(--s2);
  padding: var(--s3);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
}
.poll-edit input:not([type='checkbox']) { width: 100%; min-width: 0; }
.poll-edit .label { margin: 0; }
.poll-edit-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.poll-edit-options li {
  display: flex; align-items: center; gap: var(--s2);
  padding: 4px 0 4px 10px;
  border-bottom: 1px solid var(--rule-soft);
}
.poll-edit-options li span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.poll-edit-options button { min-height: 36px; min-width: 40px; padding: 4px 10px; font-size: 18px; line-height: 1; }
.poll-add { display: flex; gap: var(--s2); }
.poll-add input { flex: 1 1 auto; }
