/* light-theme: manual
   voting.html: daily vote tracker (progress ring, streak, reset countdown) and
   the vote sites as big tiles that flip to "voted" (assets/js/voting-tracker.js).
   Selectors start with :root to outrank the page's inline styles and the
   generated light-theme rules. */

:root .voting-page { max-width: 980px; }

:root .voting-card {
  border-radius: 28px;
  border-color: var(--nx-line);
  background: var(--nx-surface);
}

/* --- tracker --- */
.vt-progress {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 1.6rem 0;
  padding: 1.4rem 1.6rem;
  border-radius: 22px;
  border: 1px solid var(--nx-line);
  background:
    radial-gradient(400px circle at 0% 50%, rgba(16, 185, 129, 0.14), transparent 70%),
    var(--nx-surface-2);
}

.vt-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.vt-ring svg { width: 100%; height: 100%; rotate: -90deg; }
.vt-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.vt-ring-bg { stroke: var(--nx-dim); }

.vt-ring-fg {
  stroke: #10b981;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0));
  transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6));
}

.vt-ring.is-complete .vt-ring-fg { stroke: #facc15; filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.7)); }

.vt-ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1;
}

.vt-ring-text b { font-size: 2.4rem; font-weight: 900; color: var(--nx-text); }
.vt-ring-text small { font-size: 0.72rem; color: var(--nx-muted); margin-top: 0.2rem; }

.vt-stats { display: grid; gap: 0.9rem; }
.vt-stat { display: flex; align-items: center; gap: 0.8rem; }
.vt-stat-icon { font-size: 1.6rem; }
.vt-stat b { display: block; font-size: 1.3rem; color: var(--nx-text); font-variant-numeric: tabular-nums; }
.vt-stat small { color: var(--nx-muted); font-size: 0.8rem; }

/* --- vote sites as tiles --- */
:root .vote-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

:root .vote-item {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  min-height: 170px;
  padding: 1.3rem;
  border-radius: 20px;
  border: 1px solid var(--nx-line);
  background: var(--nx-surface-2);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

:root .vote-item:hover { transform: translateY(-3px); border-color: rgba(16, 185, 129, 0.5); }

:root .vote-item-num { width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; }
:root .vote-item-name { font-size: 1.1rem; font-weight: 700; color: var(--nx-text); }
:root .vote-item-desc { color: var(--nx-muted); }

:root .vote-item-arrow {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: #4ade80;
}

/* voted today: green, check instead of arrow */
:root .vote-item.is-voted {
  border-color: rgba(16, 185, 129, 0.55);
  background:
    radial-gradient(260px circle at 100% 0%, rgba(16, 185, 129, 0.2), transparent 70%),
    var(--nx-surface-2);
}

:root .vote-item.is-voted .vote-item-desc { color: #4ade80; font-weight: 600; }
:root .vote-item.is-voted .vote-item-arrow { background: #10b981; color: #04120c; }
:root .vote-item.is-voted .vote-item-arrow::before { content: "\f00c"; }

@media (max-width: 760px) {
  :root .vote-list { grid-template-columns: minmax(0, 1fr); }
  :root .vote-item { min-height: 0; }
  .vt-progress { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}

html[data-theme="light"] .vote-item.is-voted .vote-item-desc { color: #15803d; }
html[data-theme="light"] .vote-item-arrow { color: #15803d; }

/* --- Top-Voter of the month (assets/js/vote-top.js) --- */
.vt-top[hidden] { display: none; }
:root .vt-top-icon { background: linear-gradient(135deg, #fde047, #f59e0b); color: #422006; }

:root .vt-top-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.4rem; }

:root .vt-top-list li {
  display: grid;
  grid-template-columns: 2rem 32px minmax(0, 8rem) 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.06);
}

:root .vt-top-list img { border-radius: 6px; image-rendering: pixelated; }
:root .vt-rank { font-weight: 800; color: #94a3b8; text-align: center; }
:root .vt-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .vt-bar { height: 8px; border-radius: 8px; background: rgba(148, 163, 184, 0.14); overflow: hidden; }
:root .vt-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #10b981, #38bdf8); }
:root .vt-top-list b { font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }

:root .vt-medal { border: 1px solid transparent; }
:root .vt-m1 { background: linear-gradient(90deg, rgba(253, 224, 71, 0.18), rgba(148, 163, 184, 0.04)); border-color: rgba(253, 224, 71, 0.35); }
:root .vt-m2 { background: linear-gradient(90deg, rgba(226, 232, 240, 0.14), rgba(148, 163, 184, 0.04)); }
:root .vt-m3 { background: linear-gradient(90deg, rgba(251, 146, 60, 0.16), rgba(148, 163, 184, 0.04)); }
:root .vt-m1 .vt-rank { color: #fde047; }
:root .vt-m2 .vt-rank { color: #e2e8f0; }
:root .vt-m3 .vt-rank { color: #fb923c; }
:root .vt-m1 .vt-bar i { background: linear-gradient(90deg, #f59e0b, #fde047); }

:root .vt-empty { display: block !important; color: #94a3b8; }
:root .vt-top-note { margin: 0.9rem 0 0; color: #94a3b8; font-size: 0.8rem; }

@media (max-width: 520px) {
  :root .vt-top-list li { grid-template-columns: 1.6rem 28px minmax(0, 1fr) auto; }
  :root .vt-bar { display: none; }
}

html[data-theme="light"] .vt-top-list li { background: #f1f5f9; }
html[data-theme="light"] .vt-m1 { background: linear-gradient(90deg, #fef9c3, #f8fafc); border-color: rgba(202, 138, 4, 0.35); }
html[data-theme="light"] .vt-m1 .vt-rank { color: #b45309; }
html[data-theme="light"] .vt-m2 .vt-rank { color: #475569; }
html[data-theme="light"] .vt-m3 .vt-rank { color: #c2410c; }
html[data-theme="light"] .vt-name { color: #0f172a; }
