/* =====================================================================
   Fable5 app skin — Poll owner cluster (PollOwnerView, _PollResults +
   Poll display/editor templates, Poll/Add, Box/Add).
   Token-driven; loads after tokens.css + brand.css + app.css + app-box.css.
   NEEDS A LAYOUT LINK: add
     <link rel="stylesheet" href="/css/app-poll.css" />
   after the app-box.css link in _ApplicationLayout.cshtml AND
   _ApplicationLayout_PublicBox.cshtml (VoteConfirm renders _PollResults).
   JS-coupled hooks kept verbatim in markup and only restyled here:
   .pollDetails, .rowButton, .optionAddButton/.optionRowControl,
   .notificationInterval, plus the share/settings menu classes styled
   by app.css/app-box.css.
   ===================================================================== */

/* ---- results card ---- */
.poll-results-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: var(--space-4);
}
.poll-results-total {
  color: var(--ink-3);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ---- result rows: bordered option cards with token-styled bars ---- */
.poll-result {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.poll-result + .poll-result { margin-top: var(--space-3); }
.poll-result:hover { border-color: var(--brand-200); box-shadow: var(--shadow-1); }
.poll-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.poll-result-label {
  font-weight: 600;
  color: var(--ink-1);
  min-width: 0;
  overflow-wrap: anywhere;
}
.poll-result-pct {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}
.poll-result-count {
  color: var(--ink-3);
  font-size: var(--text-xs);
  margin-top: 2px;
}
.poll-result-track.progress {
  height: 10px;
  background: var(--brand-100);
  border-radius: var(--radius-full);
  box-shadow: none;
  margin-top: var(--space-3);
}
.poll-result-track .progress-bar {
  background-color: var(--brand-500);
  border-radius: var(--radius-full);
  transition: width var(--dur-base) var(--ease-out);
}

/* ---- focused single-card create forms (Poll/Add, Box/Add) ---- */
.add-form-head { text-align: center; margin-bottom: var(--space-6); }
.add-form-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  margin-bottom: var(--space-2);
}
.add-form-sub {
  color: var(--ink-3);
  font-size: var(--text-base);
  max-width: 52ch;
  margin: 0 auto;
}
.add-form-card { box-shadow: var(--shadow-2); }
.add-form-card .card-body { padding: var(--space-6); }
@media (min-width: 768px) { .add-form-card .card-body { padding: var(--space-8); } }
.add-form-card .form-group { margin-bottom: var(--space-5); }
.add-form-card .form-label { color: var(--ink-1); font-weight: 600; }
.form-hint {
  color: var(--ink-3);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}
.add-form-options {
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
}
.add-form-options .form-check.form-switch { margin-bottom: var(--space-3); }
.add-form-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
  margin-top: var(--space-2);
}

/* ---- poll choice editor rows (Poll/Add; also styles JS-appended rows) ---- */
.pollDetails > .form-label { margin-bottom: var(--space-2); }
.pollDetails .form-group {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}
.pollDetails .form-group .row { align-items: center; margin-top: 0 !important; }
.pollDetails .form-group .form-control { background: var(--surface-0); }
.pollDetails .rowButton { min-width: 32px; }
.pollDetails .optionRowControl {
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.pollDetails a.optionAddButton { color: var(--brand-600) !important; }
.pollDetails a.optionAddButton:hover { color: var(--brand-700) !important; transform: scale(1.1); }

/* ---- responsive ---- */
@media (max-width: 575.98px) {
  .poll-result { padding: var(--space-3) var(--space-4); }
  .add-form-actions .btn { width: 100%; }
}
