/* Leaderboard (leaderboard.php + assets/js/leaderboard.js). Brand colours come
   from custom.css: warm black --dfa-primary, gold --dfa-gold. Text on gold is
   the warm black; white text sits on --dfa-gold-btn (4.75:1), never the base gold. */

.lb-wrap { padding: 70px 0 90px; background: #faf8f5; }

.lb-empty { text-align: center; padding: 60px 0; color: #777; }
.lb-empty i { font-size: 3rem; color: var(--dfa-gold); margin-bottom: 16px; display: block; }

/* ── Status band ─────────────────────────────────────────────────────── */
.lb-status {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    background: var(--dfa-primary); color: #fff; border-radius: 18px; padding: 30px 34px; margin-bottom: 34px;
}
.lb-status h2 { color: #fff; font-size: 1.7rem; font-weight: 800; margin: 10px 0 6px; }
.lb-status p  { color: rgba(255,255,255,.72); margin: 0; }
.lb-live {
    display: inline-flex; align-items: center; gap: 8px; background: var(--dfa-gold); color: var(--dfa-primary);
    font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 14px; border-radius: 30px;
}
.lb-live-final, .lb-live-soon { background: #fff; }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; background: #B42318; animation: lbPulse 1.6s infinite; }
@keyframes lbPulse { 0% { box-shadow: 0 0 0 0 rgba(180,35,24,.6); } 70% { box-shadow: 0 0 0 8px rgba(180,35,24,0); } 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0); } }
@media (prefers-reduced-motion: reduce) { .lb-dot { animation: none; } }

.lb-figures { display: flex; gap: 12px; flex-wrap: wrap; }
.lb-figures > div {
    min-width: 120px; background: rgba(255,255,255,.07); border: 1px solid rgba(var(--dfa-gold-rgb),.35);
    border-radius: 12px; padding: 12px 16px; text-align: center;
}
.lb-figures b    { display: block; font-size: 1.5rem; font-weight: 800; color: var(--dfa-gold); line-height: 1.2; white-space: nowrap; }
.lb-figures span { font-size: .75rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }

/* ── Podium ──────────────────────────────────────────────────────────── */
.lb-podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin-bottom: 44px; }
.lb-step {
    position: relative; flex: 0 1 260px; background: #fff; border: 1px solid #ece6dc; border-radius: 18px;
    padding: 30px 18px 22px; text-align: center; box-shadow: 0 8px 30px rgba(20,17,14,.06);
}
.lb-step.is-lead { flex-basis: 300px; padding-top: 42px; border: 2px solid var(--dfa-gold); box-shadow: 0 14px 40px rgba(var(--dfa-gold-rgb),.25); }
.lb-crown { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 2rem; color: var(--dfa-gold); }
.lb-step .lb-av { margin: 0 auto 12px; }
.lb-place {
    display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
    padding: 4px 12px; border-radius: 20px; background: var(--dfa-primary); color: #fff; margin-bottom: 10px;
}
.lb-step.is-lead .lb-place { background: var(--dfa-gold); color: var(--dfa-primary); }
.lb-step-name { display: block; font-size: 1.1rem; font-weight: 800; color: var(--dfa-primary); line-height: 1.3; margin-bottom: 4px; }
.lb-step-name:hover { color: var(--dfa-gold-ink); }
.lb-step-votes { display: block; color: #6b6259; font-size: .9rem; margin-bottom: 14px; }
.lb-step-votes b { color: var(--dfa-primary); font-size: 1.15rem; }
.lb-podium-empty {
    width: 100%; text-align: center; background: #fff; border: 1px dashed #d9cfbf; border-radius: 18px; padding: 34px; color: #6b6259;
}
.lb-podium-empty i { color: var(--dfa-gold); font-size: 1.6rem; display: block; margin-bottom: 8px; }
.lb-podium-empty b { color: var(--dfa-primary); }

/* ── Avatars ─────────────────────────────────────────────────────────── */
.lb-av { position: relative; display: block; border-radius: 50%; overflow: hidden; background: var(--dfa-primary); flex-shrink: 0; }
.lb-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; z-index: 1; }
.lb-ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dfa-gold); font-weight: 800; }
.lb-av-lg { width: 112px; height: 112px; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--dfa-gold); }
.lb-av-lg .lb-ini { font-size: 2rem; }
.is-lead .lb-av-lg { width: 136px; height: 136px; }
.lb-av-sm { width: 52px; height: 52px; }
.lb-av-sm .lb-ini { font-size: 1rem; }

/* ── Vote buttons ────────────────────────────────────────────────────── */
.lb-vote {
    display: inline-flex; align-items: center; gap: 6px; background: var(--dfa-gold-btn); color: #fff !important;
    font-weight: 700; font-size: .88rem; padding: 9px 18px; border-radius: 30px; text-decoration: none; white-space: nowrap;
    transition: background .2s;
}
.lb-vote:hover { background: var(--dfa-primary); }
.lb-vote-podium { padding: 10px 26px; }

/* ── Full list ───────────────────────────────────────────────────────── */
.lb-board { background: #fff; border: 1px solid #ece6dc; border-radius: 18px; padding: 26px 26px 14px; }
.lb-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.lb-board-head h3 { font-size: 1.3rem; font-weight: 800; color: var(--dfa-primary); margin: 0; }
.lb-search { position: relative; margin: 0; flex: 0 1 280px; }
.lb-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9a9087; font-size: .85rem; }
.lb-search input {
    width: 100%; border: 1px solid #e3dccf; border-radius: 30px; padding: 10px 16px 10px 38px; font-size: 16px; background: #faf8f5;
}
.lb-search input:focus { outline: none; border-color: var(--dfa-gold); box-shadow: 0 0 0 3px rgba(var(--dfa-gold-rgb),.2); background: #fff; }

.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid #f1ece4; }
.lb-row:first-child { border-top: 0; }
.lb-row.is-top { background: rgba(var(--dfa-gold-rgb),.08); border-radius: 12px; }
.lb-rank { position: relative; width: 38px; flex-shrink: 0; text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--dfa-primary); }
.lb-move { display: block; font-size: .65rem; font-weight: 800; line-height: 1; margin-top: 2px; }
.lb-move.up { color: #2B7A3D; }
.lb-move.down { color: #B42318; }
.lb-name { flex: 1; min-width: 0; }
.lb-name a { color: var(--dfa-primary); }
.lb-name b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { display: block; color: #7a7067; font-size: .8rem; margin: 1px 0 6px; }
.lb-bar { display: block; height: 6px; background: #f1ece4; border-radius: 6px; overflow: hidden; }
.lb-bar span { display: block; height: 100%; background: var(--dfa-gold); border-radius: 6px; transition: width .8s ease; }
.lb-votes { width: 86px; flex-shrink: 0; text-align: right; }
.lb-votes b { display: block; font-size: 1.1rem; color: var(--dfa-primary); }
.lb-votes small { color: #7a7067; font-size: .78rem; }
.lb-nomatch { text-align: center; color: #7a7067; padding: 20px 0; margin: 0; }
.lb-updated { text-align: right; color: #9a9087; font-size: .78rem; margin: 10px 0 0; }

/* ── Phones ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .lb-wrap { padding: 40px 0 60px; }
    .lb-status { padding: 22px 20px; }
    .lb-status h2 { font-size: 1.3rem; }
    .lb-figures { width: 100%; }
    .lb-figures > div { flex: 1; min-width: 0; padding: 10px 8px; }
    .lb-figures b { font-size: 1.15rem; }
    /* Podium stays three across (2nd, 1st, 3rd), just smaller */
    .lb-podium { gap: 8px; margin-bottom: 30px; }
    .lb-step { flex: 1 1 0; min-width: 0; padding: 18px 6px 14px; border-radius: 14px; }
    .lb-step.is-lead { flex: 1.15 1 0; padding-top: 26px; }
    .lb-crown { font-size: 1.4rem; top: -15px; }
    .lb-av-lg { width: 64px; height: 64px; border-width: 3px; }
    .is-lead .lb-av-lg { width: 78px; height: 78px; }
    .lb-av-lg .lb-ini { font-size: 1.3rem; }
    .lb-place { font-size: .62rem; padding: 3px 8px; margin-bottom: 6px; }
    .lb-step-name { font-size: .88rem; }
    .lb-step-votes { font-size: .75rem; margin-bottom: 10px; }
    .lb-step-votes b { font-size: .95rem; display: block; }
    .lb-vote-podium { padding: 7px 14px; font-size: .78rem; }
    .lb-board { padding: 18px 10px 10px; }
    .lb-row { gap: 9px; padding: 12px 4px; }
    .lb-rank { width: 24px; font-size: 1rem; }
    .lb-av-sm { width: 42px; height: 42px; }
    .lb-name small { font-size: .74rem; }
    .lb-votes { width: auto; }
    .lb-votes b { font-size: .98rem; }
    /* Row button shrinks to "Vote" so the name keeps its room */
    .lb-row .lb-vote { padding: 7px 12px; font-size: .8rem; }
    .lb-row .lb-vote i { display: none; }
}
