/* Guided voting and the People's Choice runoff (T-058). Loaded after rc19.css on the rating and vote pages. */

/* Guided mode shows one home; the old deck navigation stays hidden. */
body[data-guided="on"] .rating-navigation { display: none; }

.guided-award {
  display: inline-block;
  margin: 10px 0 0;
  padding: 5px 13px;
  border: 1px solid rgba(212, 173, 99, .45);
  border-radius: 999px;
  color: var(--vote-gold, #d4ad63);
  font-size: 14px;
  font-weight: 700;
}

.guided-copy .rating-secondary-actions button,
.guided-copy .rating-secondary-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
}

.guided-copy .score-grid button { min-height: 56px; }
.guided-copy .score-grid button:disabled { opacity: .55; }
.rating-card[aria-busy="true"] .rating-copy { opacity: .75; }

.guided-done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.guided-done-actions .button,
.guided-done-actions .button-quiet { min-height: 48px; }

/* Submit button and the time line under the score buttons. */
.dwell-block { display: grid; gap: 8px; margin-top: 18px; }
.dwell-block .button { min-height: 52px; width: 100%; }
.dwell-block .button:disabled { opacity: .5; cursor: not-allowed; }
.dwell-line { margin: 0; color: rgba(242, 232, 215, .75); font-size: 14px; line-height: 1.4; }
.score-grid button[aria-pressed="true"] { border-color: var(--vote-ember, #ef8a3b); background: var(--vote-ember, #ef8a3b); color: #17100a; }

/* Runoff ballot: equal cards, in the order the server sent. */
.runoff-card {
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 34px);
  border-color: rgba(212, 173, 99, .4);
  background: linear-gradient(145deg, rgba(34, 30, 44, .96), rgba(10, 23, 32, .98));
}

.runoff-head h2 { margin: 4px 0 8px; }
.runoff-head p { margin: 0 0 6px; color: rgba(242, 232, 215, .78); }
.runoff-head .runoff-rule { color: var(--vote-gold, #d4ad63); font-weight: 700; }
.runoff-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(212, 173, 99, .1); color: rgba(242, 232, 215, .86); }

.runoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.runoff-option {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(235, 205, 169, .22);
  border-radius: 16px;
  background: #0c1b25;
}

.runoff-option.is-chosen { border-color: var(--vote-ember, #ef8a3b); box-shadow: 0 0 0 2px rgba(239, 138, 59, .45); }
.runoff-photo { aspect-ratio: 4 / 3; background: #13232d; }
.runoff-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.runoff-photo-empty { width: 100%; height: 100%; }
.runoff-option-copy { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.runoff-option-copy h3 { margin: 0 0 auto; overflow-wrap: anywhere; font-size: 22px; }
.runoff-option-copy .eyebrow { margin: 0; }
.runoff-choose { min-height: 48px; margin-top: 10px; width: 100%; }
.runoff-choose:disabled { opacity: .7; }
.runoff-feedback { min-height: 1.4em; margin: 14px 0 0; color: var(--vote-gold, #d4ad63); font-weight: 700; }

@media (max-width: 620px) {
  .runoff-grid { grid-template-columns: 1fr; }
  .runoff-photo { aspect-ratio: 16 / 10; }
  .guided-copy .score-grid { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
}

/* On touch screens a tapped score keeps its hover colors; only the selected score should look selected. */
@media (hover: none) {
  .score-grid button:hover:not([aria-pressed="true"]) { border-color: rgba(238, 202, 163, .28); background: rgba(255, 255, 255, .045); color: var(--vote-parchment, #f2e8d7); }
}
