/* ═══════════════════════════════════════════════════════════════
   Quodarkie Voting System — Frontend CSS v4
   Exact design matching quodarkie-preview.html
   ═══════════════════════════════════════════════════════════════ */

:root {
  --qv-gold:         #C9920C;
  --qv-gold-light:   #F5B800;
  --qv-gold-bg:      rgba(201,146,12,.12);
  --qv-gold-border:  rgba(201,146,12,.45);
  --qv-card-bg:      #1a1a1a;
  --qv-card-border:  rgba(255,255,255,.08);
  --qv-body-bg:      #111111;
  --qv-text:         #e8e8e8;
  --qv-text-muted:   #888888;
  --qv-handle:       #C9920C;
  --qv-green:        #4ade80;
  --qv-red:          #f87171;
  --qv-radius:       12px;
  --qv-shadow:       0 4px 20px rgba(0,0,0,.5);
}

.qv-msg       { color: var(--qv-text-muted); text-align:center; padding:24px; }
.qv-msg-error { color: var(--qv-red); }
.qv-muted     { color: var(--qv-text-muted); }

/* ══════════════════════════════════════════════════════
   CATEGORIES PAGE — [quodarkie_categories]
   ══════════════════════════════════════════════════════ */

.qv-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) { .qv-cat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px)  { .qv-cat-grid { grid-template-columns: 1fr; gap:14px; } }

.qv-cat-card {
  background: var(--qv-card-bg);
  border: 1px solid var(--qv-card-border);
  border-radius: var(--qv-radius);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.qv-cat-card:hover {
  border-color: var(--qv-gold-border);
  transform: translateY(-2px);
  box-shadow: var(--qv-shadow);
  background: #1e1e1e;
}
.qv-cat-card.qv-cat-closed { opacity: .75; }

.qv-cat-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.qv-trophy-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  background: var(--qv-gold-bg);
  border: 1px solid var(--qv-gold-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--qv-gold);
  margin-top: 2px;
}
.qv-cat-card-title {
  margin: 0;
  font-size: 17px; font-weight: 700;
  color: var(--qv-text);
  line-height: 1.35;
}
.qv-cat-nominee-list {
  display: flex; flex-direction: column; gap: 5px;
  padding-left: 56px;
  flex: 1;
}
.qv-cat-nominee-item {
  font-size: 13.5px;
  color: var(--qv-handle);
  line-height: 1.4;
}
.qv-no-nominees { font-size: 13px; color: var(--qv-text-muted); font-style: italic; }

.qv-cat-card-footer {
  display: flex; flex-direction: column; gap: 8px;
}
.qv-countdown-inline {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--qv-text-muted);
}
.qv-ci-timer { color: var(--qv-gold-light); font-weight: 700; font-family: monospace; }

.qv-vote-now-btn {
  display: inline-flex; align-items: center; gap: 8px;
  width: fit-content;
  padding: 10px 20px;
  background: transparent;
  color: var(--qv-gold) !important;
  border: 1px solid var(--qv-gold-border);
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none !important;
  transition: background .18s, border-color .18s, color .18s;
  cursor: pointer;
}
.qv-vote-now-btn:hover {
  background: var(--qv-gold-bg);
  border-color: var(--qv-gold);
  color: var(--qv-gold-light) !important;
}
.qv-vote-now-btn svg { transition: transform .18s; }
.qv-vote-now-btn:hover svg { transform: translateX(3px); }

.qv-closed-label  { font-size: 13px; color: var(--qv-red); font-weight: 600; }
.qv-winner-preview{ font-size: 13px; color: var(--qv-gold); font-weight: 600; }

/* ══════════════════════════════════════════════════════
   VOTE PAGE — [quodarkie_vote]
   ══════════════════════════════════════════════════════ */

.qv-vote-page { color: var(--qv-text); font-family: inherit; }

.qv-tab-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.qv-tab {
  background: rgba(255,255,255,.05);
  color: var(--qv-text-muted);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit; line-height: 1;
}
.qv-tab:hover      { background: var(--qv-gold-bg); color: var(--qv-gold); border-color: var(--qv-gold-border); }
.qv-tab.active     { background: var(--qv-gold); color: #000 !important; border-color: var(--qv-gold); }
.qv-tab.is-closed  { opacity: .6; }
.qv-tab-lock       { margin-left: 4px; }

.qv-tab-section        { display: none; }
.qv-tab-section.active { display: block; }

.qv-section-head { margin-bottom: 24px; }
.qv-section-title-wrap {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.qv-section-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--qv-gold); }
.qv-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.qv-pill-open   { background: rgba(74,222,128,.1);  color: var(--qv-green); border: 1px solid rgba(74,222,128,.3); }
.qv-pill-closed { background: rgba(248,113,113,.1); color: var(--qv-red);   border: 1px solid rgba(248,113,113,.3); }

.qv-timer-strip {
  font-size: 13px; color: var(--qv-text-muted);
  background: var(--qv-gold-bg); border: 1px solid var(--qv-gold-border);
  border-radius: 8px; padding: 7px 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.qv-timer { color: var(--qv-gold-light); font-family: monospace; font-size: 15px; }

.qv-nominee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) { .qv-nominee-grid { grid-template-columns: repeat(2,1fr); gap:12px; } }
@media (max-width: 380px) { .qv-nominee-grid { grid-template-columns: 1fr; } }

.qv-nom-card {
  background: var(--qv-card-bg);
  border: 1px solid var(--qv-card-border);
  border-radius: var(--qv-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.qv-nom-card:hover {
  border-color: var(--qv-gold-border);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.qv-nom-card.is-leading {
  border-color: var(--qv-gold);
  box-shadow: 0 0 20px rgba(201,146,12,.25);
}

.qv-leading-crown {
  position: absolute; top: 10px; right: 10px;
  background: var(--qv-gold); color: #000;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; z-index: 2;
}

.qv-nom-photo-wrap {
  width: 100%; aspect-ratio: 1/1;
  overflow: hidden; background: #222;
}
.qv-nom-photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s;
}
.qv-nom-card:hover .qv-nom-photo-wrap img { transform: scale(1.04); }

.qv-nom-initials {
  width: 100%; height: 100%; min-height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 700;
  color: var(--qv-gold); background: #1c1c1c;
}

.qv-nom-info   { padding: 12px 14px 6px; }
.qv-nom-name   { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.3; }
.qv-nom-handle { font-size: 12.5px; color: var(--qv-handle); margin-top: 2px; }

.qv-nom-votes-row {
  display: flex; align-items: baseline; gap: 4px;
  padding: 0 14px 6px;
}
.qv-vcount { font-size: 16px; font-weight: 700; color: var(--qv-gold-light); }
.qv-vlabel { font-size: 11px; color: var(--qv-text-muted); text-transform: uppercase; letter-spacing: .4px; }

.qv-bar-wrap { height: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.qv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--qv-gold), var(--qv-gold-light));
  transition: width .6s ease; min-width: 2px;
}

.qv-pkg-btns { display: flex; gap: 6px; padding: 10px 10px 12px; }
.qv-pkg-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  background: transparent; border: 1px solid var(--qv-gold-border);
  border-radius: 7px; padding: 8px 4px;
  text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .1s;
  cursor: pointer;
}
.qv-pkg-btn:hover { background: var(--qv-gold); border-color: var(--qv-gold); transform: scale(1.04); }
.qv-pkg-price     { font-size: 14px; font-weight: 700; color: var(--qv-gold-light); line-height: 1; }
.qv-pkg-btn:hover .qv-pkg-price { color: #000; }
.qv-pkg-votes     { font-size: 10px; color: var(--qv-text-muted); margin-top: 3px; white-space: nowrap; }
.qv-pkg-btn:hover .qv-pkg-votes { color: #000; }

/* ══════════════════════════════════════════════════════
   RESULTS VIEW (closed category)
   ══════════════════════════════════════════════════════ */
.qv-results-section { padding: 8px 0; }
.qv-results-heading { font-size: 22px; color: var(--qv-gold); font-weight: 700; margin-bottom: 20px; }

.qv-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.qv-result-card {
  background: var(--qv-card-bg); border: 1px solid var(--qv-card-border);
  border-radius: var(--qv-radius); padding: 20px 14px 16px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
}
.qv-result-card.is-winner {
  border-color: var(--qv-gold);
  background: linear-gradient(160deg,#1e1800,#1a1a1a);
  box-shadow: 0 0 24px rgba(201,146,12,.3);
}
.qv-result-medal   { font-size: 30px; }
.qv-result-avatar  { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--qv-gold-border); }
.qv-result-initials {
  width: 72px; height: 72px; border-radius: 50%;
  background: #222; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: var(--qv-gold);
  border: 2px solid var(--qv-gold-border);
}
.qv-result-name    { font-size: 14px; font-weight: 700; color: #fff; }
.qv-result-handle  { font-size: 12px; color: var(--qv-handle); }
.qv-result-votes   { font-size: 15px; font-weight: 700; color: var(--qv-gold-light); }
.qv-vote-bar-wrap  { width: 100%; height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.qv-vote-bar       { height: 100%; background: linear-gradient(90deg,var(--qv-gold),var(--qv-gold-light)); }

/* ══════════════════════════════════════════════════════
   LEADERBOARD — [quodarkie_leaderboard]
   ══════════════════════════════════════════════════════ */
.qv-leaderboard   { max-width: 760px; margin: 0 auto; }
.qv-lb-heading    { font-size: 24px; font-weight: 700; color: var(--qv-gold); margin-bottom: 20px; text-align: center; }
.qv-lb-table      { width: 100%; border-collapse: collapse; background: var(--qv-card-bg); border: 1px solid var(--qv-card-border); border-radius: var(--qv-radius); overflow: hidden; }
.qv-lb-table thead{ background: #111; }
.qv-lb-table th   { color: var(--qv-gold); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 12px 16px; text-align: left; }
.qv-lb-table td   { padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.05); color: var(--qv-text); font-size: 14px; }
.qv-lb-rank       { font-size: 20px; text-align: center; width: 48px; }

/* ══════════════════════════════════════════════════════
   PAYMENT NOTICES (success / cancel returned from Stripe)
   ══════════════════════════════════════════════════════ */
.qv-payment-notice {
  padding: 14px 20px;
  border-radius: var(--qv-radius);
  margin-bottom: 22px;
  font-size: 15px;
  border: 1px solid transparent;
  line-height: 1.5;
}
.qv-payment-success {
  background: rgba(74,222,128,.12);
  border-color: rgba(74,222,128,.35);
  color: #4ade80;
}
.qv-payment-cancel {
  background: rgba(248,113,113,.10);
  border-color: rgba(248,113,113,.30);
  color: #f87171;
}

/* ══════════════════════════════════════════════════════
   STRIPE BUTTON STATES
   ══════════════════════════════════════════════════════ */
.qv-pkg-btn { cursor: pointer; }
.qv-pkg-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

/* ── Local currency label on vote buttons ──────────────────────────── */
.qv-pkg-btn { flex-direction: column; }
.qv-pkg-local {
    font-size: 11px;
    font-weight: 700;
    color: #e67e00;
    letter-spacing: .3px;
    line-height: 1;
}

/* ── Public closed notice (winner hidden) ──────────────────────────── */
.qv-closed-public-notice {
    text-align: center;
    padding: 48px 24px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--qv-radius);
    margin: 12px 0;
}
.qv-closed-lock { font-size: 48px; margin-bottom: 12px; }
.qv-closed-title { font-size: 20px; font-weight: 700; color: var(--qv-text); margin-bottom: 8px; }
.qv-closed-sub { font-size: 14px; color: #888; max-width: 380px; margin: 0 auto; line-height: 1.6; }

/* ── Admin-only results banner ─────────────────────────────────────── */
.qv-admin-only-notice {
    background: rgba(251,191,36,.12);
    border: 1px solid rgba(251,191,36,.4);
    color: #f59e0b;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
}

/* ── Admin preview local label in packages table ───────────────────── */
.qv-pkg-preview-local {
    font-size: 11px;
    font-weight: 700;
    color: #e67e00;
}
