/* /css/pages/vote.css */

/* =========================
   Vote Page Status Banner
========================= */

.vote-status-banner {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem;
  background: linear-gradient(90deg, #7454c7, #8b5fd8);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.vote-status-banner span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.vote-status-banner a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vote-status-banner a:hover,
.vote-status-banner a:focus-visible {
  color: var(--color-accent-soft);
}

/* =========================
   Vote Page Shell / Hero
========================= */

.vote-page {
  width: 100%;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.vote-hero {
  padding: clamp(2rem, 4vw, 2.75rem) 0 clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
  background:
    radial-gradient(circle at top center, rgba(242, 178, 74, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 40, 82, 0.5), rgba(3, 23, 47, 0));
}

.vote-hero-inner {
  width: min(920px, calc(100% - 2rem));
  margin-inline: auto;
}

.vote-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 5.5vw, 4.85rem);
  line-height: 0.95;
  color: var(--color-text);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.vote-open-word {
  display: block;
  margin-top: 0.28rem;
  margin-bottom: 0.35rem;
  color: var(--color-accent-soft);
  font-family: var(--font-base);
  font-size: clamp(1.85rem, 3.8vw, 3.15rem);
  font-weight: 1000;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(242, 178, 74, 0.55),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.vote-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--color-text-soft);
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
  line-height: 1.5;
}

.vote-section {
  padding: 0.5rem 0 clamp(2.5rem, 5vw, 4rem);
}

.vote-container {
  width: min(1040px, calc(100% - 2rem));
}

/* =========================
   Login / Closed States
========================= */

.vote-state-panel {
  max-width: 780px;
  margin: 0.75rem auto 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(18, 75, 137, 0.78), rgba(9, 37, 77, 0.94));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.vote-state-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(126, 97, 191, 0.32);
  border: 1px solid rgba(229, 220, 255, 0.22);
  color: var(--color-accent-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vote-state-panel h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.95;
  color: var(--color-text);
}

.vote-state-panel p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.vote-state-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.vote-state-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Matchup Panel
========================= */

.vote-matchup-panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
  background:
    radial-gradient(circle at top center, rgba(18, 75, 137, 0.35), transparent 48%),
    linear-gradient(180deg, rgba(7, 31, 64, 0.98), rgba(3, 23, 47, 0.98));
  border: 1px solid rgba(93, 154, 211, 0.32);
  border-radius: var(--radius-md);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.vote-matchup-heading {
  text-align: center;
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.vote-matchup-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.3vw, 2.8rem);
  line-height: 1;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.vote-matchup-heading p {
  margin: 0.25rem auto 0;
  max-width: 560px;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  line-height: 1.35;
}

/* =========================
   Dynamic Vote Matchup Items
   Rendered by /js/vote.js
========================= */

.vote-story-grid,
.story-grid {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}

.vote-matchup-card {
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vote-matchup-title {
  min-height: 1.35em;
  margin: 0 0 0.7rem;
  font-family: var(--font-base);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.15;
  font-weight: 900;
  color: var(--color-text);
}

/* Image-only presentation: no visible frame around artwork */
.vote-matchup-art-link {
  width: 100%;
  max-width: 390px;
  height: auto;
  margin: 0 auto;
  display: block;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.vote-matchup-art-link:hover,
.vote-matchup-art-link:focus-visible {
  transform: translateY(-2px);
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
}

.vote-matchup-art-link:focus-visible {
  outline: 2px solid rgba(242, 178, 74, 0.75);
  outline-offset: 5px;
}

.vote-matchup-art-link img {
  width: 100%;
  height: auto;
  max-height: 420px;
  display: block;
  object-fit: contain;
  object-position: center;
  padding: 0;
  border-radius: 0.25rem;
}

.vote-matchup-art-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--color-text-soft);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vote-matchup-actions {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.vote-matchup-actions .btn {
  margin: 0;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.vote-total-count {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(242, 178, 74, 0.16);
  border: 1px solid rgba(242, 178, 74, 0.34);
  color: var(--color-accent-soft);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
}

.vote-total-count[hidden] {
  display: none;
}

.vote-btn.voted {
  box-shadow: 0 0 0 3px rgba(242, 178, 74, 0.18);
}

.vote-btn:disabled {
  opacity: 0.7;
}

.vote-empty-state {
  grid-column: 1 / -1;
  padding: 1.1rem;
  text-align: center;
  background: rgba(7, 31, 64, 0.72);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
}

/* =========================
   Legacy Vote Card Cleanup
   Keeps old classes from interfering if cached markup appears
========================= */

.vote-story-card,
.story-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.story-status,
.story-card-author,
.story-card-description,
.story-card-vote-summary,
.story-card-vote-status,
.story-card-votes {
  display: none;
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px) {
  .vote-section {
    padding-top: 0;
  }

  .vote-matchup-panel {
    width: min(620px, 100%);
  }

  .vote-story-grid,
  .story-grid {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
  }

  .vote-matchup-art-link {
    max-width: min(430px, 100%);
  }

  .vote-matchup-art-link img {
    max-height: 460px;
  }
}

@media (max-width: 720px) {
  .vote-state-actions,
  .vote-matchup-actions {
    flex-direction: column;
  }

  .vote-state-actions .btn,
  .vote-matchup-actions .btn,
  .vote-total-count {
    width: 100%;
  }

  .vote-matchup-actions {
    max-width: 100%;
    gap: 0.55rem;
  }

  .vote-matchup-actions .btn,
  .vote-total-count {
    min-height: 44px;
    padding: 0.7rem 0.9rem;
  }
}

@media (max-width: 640px) {
  .vote-status-banner {
    min-height: 34px;
    padding: 0.45rem 0.85rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    flex-wrap: wrap;
  }

  .vote-hero {
    padding: 2rem 0 1.25rem;
  }

  .vote-hero h1 {
    font-size: clamp(2.25rem, 10vw, 3.4rem);
  }

  .vote-open-word {
    font-size: clamp(1.65rem, 8vw, 2.55rem);
  }

  .vote-section {
    padding-top: 0.85rem;
  }

  .vote-matchup-panel {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .vote-matchup-art-link {
    max-width: 100%;
  }

  .vote-matchup-art-link img {
    max-height: 390px;
  }
}