/* Date polls (/poll, /p/<id>). Builds on styles.css. */

.poll-wrap { max-width: 600px; }
/* No language flag on this page, so no room kept for it. */
.poll-page .mode > .intro:first-child h1::before { display: none; }
.poll-page .intro h1 { overflow-wrap: anywhere; }
.poll-page .intro .eyebrow { margin-bottom: 8px; }

.poll-muted { margin: 0; color: var(--slate); font-size: 15px; }
.poll-small { font-size: 13px; }
.poll-center { text-align: center; margin: 24px 0 0; }
.poll-where { margin: 6px 0 0 !important; font-weight: 700; color: var(--ink) !important; }
.poll-description { margin: 8px 0 0 !important; white-space: pre-line; }

/* ---------- making a poll ---------- */
.poll-label {
  margin: 10px 18px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
}
.poll-slots { list-style: none; margin: 0; padding: 0 18px; display: grid; gap: 8px; }
.poll-slot { display: flex; gap: 8px; align-items: center; min-width: 0; }
.poll-slot input[type="date"] { flex: 1 1 auto; }
.poll-slot input[type="time"] { flex: 0 0 116px; }
.poll-slot input[hidden] { display: none; }
.poll-slot input { min-height: 44px; padding: 8px 12px; font-weight: 600; }
.poll-remove {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  color: var(--slate);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.poll-remove:hover { color: var(--ink); }
.poll-remove[hidden] { visibility: hidden; display: block; }
.poll-add { color: var(--poppy-deep); text-decoration: none; }
.poll-add:hover { text-decoration: underline; }

.poll-row-label { font-weight: 600; font-size: 15px; }
.poll-durations { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.poll-duration {
  padding: 5px 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
  cursor: pointer;
}
.poll-duration[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.poll-durations-row { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 480px) {
  .poll-durations { margin-left: 0; justify-content: flex-start; flex-basis: 100%; }
}

.poll-custom { gap: 8px; padding-left: 50px; }
.poll-custom[hidden] { display: none; }
.composer .poll-custom input[type="number"] {
  flex: 0 0 72px;
  width: 72px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font: inherit;
  font-weight: 700;
  text-align: center;
}
.poll-custom span { color: var(--slate); font-weight: 600; }

.poll-mine-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  min-width: 0;
}
.poll-mine-item:hover { border-color: var(--ink); }
.poll-mine-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-mine-item span { flex: none; color: var(--slate); font-size: 14px; }

.poll-owner { display: grid; gap: 10px; padding-top: 8px; }
.poll-owner .eyebrow { margin: 0; }
.share-box .send-row { margin-top: 4px; }

/* ---------- answering ---------- */
.poll-answer { gap: 14px; }
.poll-choices { display: grid; gap: 8px; }
.poll-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  min-height: 60px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.poll-choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--poppy); }
.poll-choice:hover { border-color: var(--ink); }
.poll-choice:has(input:checked) { border-color: var(--poppy); background: #fff7f5; }
.poll-choice:has(input:focus-visible) { outline: 3px solid rgba(224, 58, 30, .35); outline-offset: 2px; }
.poll-choice.is-past { opacity: .5; cursor: default; }
.poll-choice-text { display: grid; min-width: 0; }
.poll-choice-text strong { font-size: 16px; }
.poll-choice-text span { color: var(--slate); font-size: 14px; font-variant-numeric: tabular-nums; }
.poll-choice-none { min-height: 52px; }
.poll-choice-none .poll-choice-text { font-weight: 600; color: var(--slate); }

.poll-summary { margin: 0 0 28px; }
.poll-picked { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.poll-picked li {
  padding: 10px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
}
.poll-picked li.is-none { color: var(--slate); font-weight: 600; }

/* ---------- results ---------- */
.poll-results { display: grid; gap: 10px; }
.poll-result {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
.poll-result.is-best { border-color: var(--poppy); }
.poll-result.is-past { opacity: .6; }
.poll-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poll-count {
  flex: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
}
.poll-result.is-best .poll-count { color: var(--poppy); }
.poll-bar { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width .3s; }
.poll-result.is-best .poll-bar span { background: var(--poppy); }
.poll-badge {
  margin: 0;
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--poppy);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.poll-names { margin: 0; font-size: 14px; color: var(--slate); }
.poll-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.poll-actions .btn { flex: 1 1 150px; }

#rCant { margin-top: 12px; }
.poll-answers { display: grid; gap: 8px; margin-top: 20px; }
.poll-answers:empty { display: none; }
.poll-note {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-left: 3px solid var(--line);
  font-size: 14px;
}
.poll-note span { color: var(--slate); white-space: pre-line; overflow-wrap: anywhere; }
.poll-again { margin-top: 36px; margin-bottom: 0; }
.poll-again .eyebrow { margin: 0; }
