/* _vote.css — Vote Widget for Kosmik Dstroyer
   Style matches Games Arcade modal: dark bg, amber borders, VT323 font */

/* ── Trigger button wrapper ─────────────────────────────────────────────── */

#vote-button-wrapper {
  width: 100%;
  padding: 0 0 0.5rem;
  box-sizing: border-box;
}

/* ── Trigger button — inherits .ondemand-button, overrides width/display ── */

#vote-trigger-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: transparent;
  color: #ff00ff;
  border: 1px solid #ff00ff;
  font-family: 'VT323', monospace;
  font-size: var(--font-size-small, 0.9em);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  letter-spacing: 1px;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  animation: pulsating-glow-vote 2s infinite;
}

@keyframes pulsating-glow-vote {
  0%   { box-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff; }
  50%  { box-shadow: 0 0 15px #ff00ff, 0 0 25px #ff00ff; }
  100% { box-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff; }
}

#vote-trigger-button:hover:not(:disabled) {
  background-color: #ff00ff;
  color: #000;
}

#vote-trigger-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #555;
  border-color: #555;
}

/* ── Modal overlay ──────────────────────────────────────────────────────── */

.vote-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2200;
  backdrop-filter: blur(4px);
}

.vote-modal-overlay.active {
  display: flex;
  animation: vote-fade-in 0.25s ease-in-out;
}

/* ── Modal content ──────────────────────────────────────────────────────── */

.vote-modal-content {
  position: relative;
  background: linear-gradient(160deg, #111 0%, #000 100%);
  border: 2px solid var(--color-primary, #ffb300);
  box-shadow:
    0 0 20px rgba(255, 179, 0, 0.3),
    inset 0 0 20px rgba(255, 179, 0, 0.08);
  padding: 1.5rem;
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  animation: vote-slide-in 0.35s ease-out;
}

@keyframes vote-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes vote-slide-in {
  from { transform: translateY(-40px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.vote-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--color-primary, #ffb300);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.vote-modal-title {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1.6rem;
  color: var(--color-secondary, #ffea00);
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 179, 0, 0.6);
}

.vote-modal-close {
  background: none;
  border: none;
  color: var(--color-primary, #ffb300);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.vote-modal-close:hover { color: var(--color-secondary, #ffea00); }

/* ── Body ───────────────────────────────────────────────────────────────── */

.vote-modal-body {
  min-height: 80px;
}

.vote-modal-msg {
  font-family: var(--font-family-mono, 'VT323', monospace);
  color: var(--color-text-secondary, #c0c0c0);
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem 0;
}

.vote-winner-msg {
  color: var(--color-secondary, #ffea00);
  font-size: 1.15rem;
  line-height: 1.6;
  text-shadow: 0 0 8px rgba(255, 179, 0, 0.4);
}

.vote-winner-label {
  color: var(--color-primary, #ffb300);
  font-weight: bold;
}

.vote-next-label {
  font-size: 0.9em;
  opacity: 0.7;
}

/* ── Login CTA ──────────────────────────────────────────────────────────── */

.vote-login-cta-btn {
  display: block;
  margin: 0.75rem auto 0;
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1.1rem;
  background: transparent;
  color: var(--color-primary, #ffb300);
  border: 1px solid var(--color-primary, #ffb300);
  padding: 6px 20px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.vote-login-cta-btn:hover {
  color: var(--color-secondary, #ffea00);
  border-color: var(--color-secondary, #ffea00);
  box-shadow: 0 0 8px rgba(255, 234, 0, 0.4);
}

/* ── Candidates grid ─────────────────────────────────────────────────────── */

.vote-candidates-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vote-candidate-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 179, 0, 0.3);
  padding: 0.6rem;
  background: rgba(255, 179, 0, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.vote-candidate-card:hover {
  border-color: rgba(255, 179, 0, 0.7);
  background: rgba(255, 179, 0, 0.08);
}

.vote-candidate-cover {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 179, 0, 0.4);
  image-rendering: pixelated;
  filter: grayscale(40%) contrast(130%) sepia(40%);
}

.vote-candidate-info {
  flex: 1;
  min-width: 0;
}

.vote-candidate-title {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1rem;
  color: var(--color-text-white, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-candidate-artist {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 0.88rem;
  color: var(--color-text-muted, #aaa);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.vote-cast-btn {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1rem;
  background: transparent;
  color: var(--color-primary, #ffb300);
  border: 1px solid var(--color-primary, #ffb300);
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.vote-cast-btn:hover {
  color: var(--color-secondary, #ffea00);
  border-color: var(--color-secondary, #ffea00);
  box-shadow: 0 0 6px rgba(255, 234, 0, 0.5);
}

/* ── Vote bar ────────────────────────────────────────────────────────────── */

.vote-bar-container {
  position: relative;
  height: 14px;
  background: rgba(255, 179, 0, 0.1);
  border: 1px solid rgba(255, 179, 0, 0.25);
  margin-top: 5px;
  overflow: hidden;
}

.vote-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffb300, #ffea00);
  transition: width 0.5s ease;
}

.vote-bar-label {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 0.75rem;
  color: var(--color-text-white, #fff);
  text-shadow: 0 0 4px #000;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Results list ────────────────────────────────────────────────────────── */

.vote-my-vote-label {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 0.95rem;
  color: var(--color-primary, #ffb300);
  text-align: center;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.vote-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vote-result-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(255, 179, 0, 0.2);
  transition: border-color 0.2s;
}

.vote-result-row.leading {
  border-color: rgba(255, 179, 0, 0.6);
  background: rgba(255, 179, 0, 0.06);
}

.vote-result-row.my-vote {
  border-color: rgba(0, 255, 255, 0.4);
}

.vote-result-rank {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1.1rem;
  color: var(--color-primary, #ffb300);
  width: 24px;
  flex-shrink: 0;
  text-align: center;
  padding-top: 2px;
}

.vote-result-row.leading .vote-result-rank {
  color: var(--color-secondary, #ffea00);
  text-shadow: 0 0 6px rgba(255, 234, 0, 0.6);
}

.vote-result-info {
  flex: 1;
  min-width: 0;
}

.vote-result-title {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 1rem;
  color: var(--color-text-white, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-result-artist {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 0.85rem;
  color: var(--color-text-muted, #aaa);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ── Footer / timer ─────────────────────────────────────────────────────── */

.vote-modal-footer {
  font-family: var(--font-family-mono, 'VT323', monospace);
  font-size: 0.9rem;
  color: var(--color-text-muted, #aaa);
  text-align: center;
  border-top: 1px dashed rgba(255, 179, 0, 0.3);
  margin-top: 1rem;
  padding-top: 0.6rem;
  letter-spacing: 1px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .vote-modal-content {
    padding: 1rem;
  }

  .vote-candidate-card {
    flex-wrap: wrap;
  }

  .vote-cast-btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}
