/* ═══════════════════════════════════════════
   Rahapeli Viking Lotto -tulokset — Styles
   Light default + .dark-theme overridet
   ═══════════════════════════════════════════ */

.vl-wrap {
    max-width: 900px;
    margin: 0 auto 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.article-content .vl-wrap { max-width: 100%; }

/* ─── Latest result hero ─── */
.vl-latest {
    background: linear-gradient(135deg, #1d6fa4 0%, #145680 50%, #0d3d5c 100%) !important;
    border-radius: 16px;
    padding: 24px 20px 20px;
    margin-bottom: 20px;
    color: #fff !important;
}
.vl-latest, .vl-latest * { color: #fff !important; }
.vl-latest-header h2 { font-size: 1.4em; margin: 0 0 8px; color: #fff !important; }
.vl-draw-meta {
    color: #b8d8f0 !important; font-size: 1.05em; font-weight: 500;
    margin: 0 0 16px;
}

/* ─── Balls ─── */
.vl-balls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}
.vl-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0c040 0%, #e6a800 100%) !important;
    color: #1a1a2e !important;
    font-size: 1.1em;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    position: relative;
}
.vl-ball-viking {
    background: linear-gradient(145deg, #4CAF50 0%, #388E3C 100%) !important;
    color: #fff !important;
}
.vl-ball-plus {
    background: linear-gradient(145deg, #ab47bc 0%, #7b2d8e 100%) !important;
    color: #fff !important;
}
.vl-ball-sub {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.45em;
    color: #ffe082;
    font-weight: 800;
}
.vl-ball-separator { color: #8892b0 !important; font-size: 1.5em; font-weight: 300; }

/* ─── Mini balls ─── */
.vl-mini-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0c040;
    color: #1a1a2e;
    font-size: 0.75em;
    font-weight: 700;
}
.vl-mini-viking { background: #4CAF50; color: #fff; }
.vl-mini-plus   { background: #ab47bc; color: #fff; }

/* ─── Win summary ─── */
.vl-win-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
}
.vl-win-stat {
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 6px;
}
.vl-win-num   { display: block; font-size: 1.4em; font-weight: 900; color: #fff !important; }
.vl-win-label { display: block; font-size: 0.72em; color: #b8d8f0 !important; margin-top: 2px; }

/* ─── TTV notice ─── */
.vl-ttv-notice {
    font-size: 0.8em;
    color: #b8d8f0 !important;
    text-align: center;
    margin-top: 12px;
    opacity: 0.85;
}

/* ─── Dynamic text ─── */
.vl-dynamic-text {
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 1.02em;
}
.vl-dynamic-text p { margin: 0 0 10px; }

/* ─── Section ─── */
.vl-section {
    background: var(--vl-section-bg, #fff);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.vl-section h3 { margin: 0 0 16px; font-size: 1.15em; color: inherit !important; }
.vl-section h4 { margin: 0 0 10px; font-size: 0.95em; color: inherit !important; opacity: 0.7; font-weight: 500; }

/* ─── Table ─── */
.vl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93em;
    min-width: 480px;
}
.vl-table th {
    text-align: left;
    padding: 8px 10px;
    background: rgba(0,0,0,0.04);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.vl-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    vertical-align: middle;
}
.vl-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.vl-jackpot-row { background: rgba(76,175,80,0.08) !important; }

/* ─── Numpad ─── */
.vl-numpad {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.vl-numpad-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.15);
    background: rgba(0,0,0,0.03);
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.vl-numpad-btn:hover  { border-color: #1d6fa4; background: rgba(29,111,164,0.1); }
.vl-numpad-btn.selected { background: linear-gradient(145deg, #f0c040, #e6a800); color: #1a1a2e; border-color: #e6a800; }
.vl-viking-btn.selected { background: linear-gradient(145deg, #4CAF50, #388E3C); color: #fff; border-color: #388E3C; }
.vl-viking-pad .vl-numpad-btn { width: 48px; font-size: 1em; }
.vl-check-selected {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.vl-check-btn {
    background: linear-gradient(135deg, #1d6fa4, #145680);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.vl-check-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.vl-check-result-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
}

/* ─── Jackpot stats ─── */
.vl-jackpot-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.vl-jackpot-stat {
    text-align: center;
    padding: 14px 8px;
    border-radius: 10px;
    background: rgba(128,128,128,0.05);
}
.vl-stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 900;
    color: #1d6fa4;
}
.vl-stat-label {
    font-size: 0.78rem;
    opacity: 0.65;
    display: block;
    margin-top: 4px;
}

/* ─── Heatmap ─── */
.vl-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.vl-heat-cell {
    border-radius: 6px;
    padding: 5px 2px;
    transition: transform 0.15s;
    cursor: default;
}
.vl-heat-cell:hover { transform: scale(1.1); z-index: 1; }

/* ─── Pagination ─── */
.vl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.vl-page-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.15);
    color: #1d6fa4;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}
.vl-page-btn:hover { background: rgba(29,111,164,0.08); }
.vl-page-info { font-size: 0.9em; opacity: 0.7; }

/* ─── Responsible gambling ─── */
.vl-responsible {
    font-size: 0.82em;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    opacity: 0.8;
    margin-top: 10px;
}
.vl-responsible a { color: #4caf50; font-weight: 600; text-decoration: none; }

/* ═══════════════════════════════════════════
   DARK MODE: html.dark-theme
   ═══════════════════════════════════════════ */
.dark-theme .vl-wrap { color: #d4d4d8 !important; }

.dark-theme .vl-dynamic-text p,
.dark-theme .vl-section h3,
.dark-theme .vl-section h4,
.dark-theme .vl-section p,
.dark-theme .vl-table td,
.dark-theme .vl-table td strong,
.dark-theme .vl-draw-meta,
.dark-theme .vl-source-note {
    color: #d4d4d8 !important;
}

.dark-theme .vl-section {
    background: var(--surface, #1e1e2e) !important;
    border-color: var(--border-color, rgba(255,255,255,0.1)) !important;
}
.dark-theme .vl-dynamic-text {
    background: var(--surface, #1e1e2e) !important;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1)) !important;
    border-radius: 12px; padding: 20px;
}
.dark-theme .vl-table th { background: rgba(255,255,255,0.08) !important; color: #d4d4d8 !important; }
.dark-theme .vl-table td { border-bottom-color: rgba(255,255,255,0.06) !important; }
.dark-theme .vl-table tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
.dark-theme .vl-jackpot-row { background: rgba(76,175,80,0.1) !important; }

.dark-theme .vl-stat-number { color: #60a5fa !important; }
.dark-theme .vl-stat-label { color: #a1a1aa !important; opacity: 1 !important; }
.dark-theme .vl-jackpot-stat { background: rgba(255,255,255,0.06) !important; }

.dark-theme .vl-numpad-btn {
    color: #e0e0e0 !important;
    border-color: rgba(255,255,255,0.2) !important;
    background: rgba(255,255,255,0.06) !important;
}
.dark-theme .vl-numpad-btn:hover { border-color: #1d6fa4 !important; background: rgba(29,111,164,0.15) !important; color: #fff !important; }
.dark-theme .vl-numpad-btn.selected { background: linear-gradient(145deg,#f0c040,#e6a800) !important; color: #1a1a2e !important; border-color: #e6a800 !important; }
.dark-theme .vl-viking-btn.selected { background: linear-gradient(145deg,#4CAF50,#388E3C) !important; color: #fff !important; border-color: #388E3C !important; }

.dark-theme .vl-check-selected {
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: #e0e0e0 !important;
}
.dark-theme .vl-check-result-box {
    background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1);
}

.dark-theme .vl-page-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: #60a5fa; }
.dark-theme .vl-page-info { color: #a1a1aa !important; opacity: 1 !important; }

.dark-theme .vl-heat-cell { color: #f0f0f0; }
.dark-theme .vl-mini-ball { background: rgba(240,192,64,0.2); color: #ffd54f; }
.dark-theme .vl-mini-viking { background: rgba(76,175,80,0.2); color: #81c784; }
.dark-theme .vl-mini-plus { background: rgba(171,71,188,0.2); color: #ce93d8; }
.dark-theme .vl-responsible { border-color: rgba(255,255,255,0.08); }

.dark-theme .vl-wrap h2 { color: #f1f5f9 !important; }
.dark-theme .vl-wrap [style*="opacity:0."], .dark-theme .vl-wrap [style*="opacity: 0."] { color: #a1a1aa !important; }
.dark-theme .vl-wrap p[style] { color: #a1a1aa !important; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .vl-wrap { padding: 0 !important; }
    .vl-section { padding: 14px !important; }
    .vl-ball { width: 36px !important; height: 36px !important; font-size: 0.95em !important; }
    .vl-heatmap-grid { grid-template-columns: repeat(6, 1fr) !important; }
    .vl-jackpot-summary { grid-template-columns: 1fr 1fr !important; }
    .vl-win-summary { grid-template-columns: 1fr 1fr !important; }
    .vl-numpad-btn { width: 30px !important; height: 30px !important; font-size: 0.78em !important; }
}
@media (max-width: 400px) {
    .vl-heatmap-grid { grid-template-columns: repeat(5, 1fr) !important; }
}

/* ── Countdown ── */
.vl-countdown-section { text-align: center; }
.vl-countdown {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 4px;
}
.vl-cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    background: var(--color-card-bg, #1e293b);
    border-radius: 10px;
    padding: 12px 8px 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.vl-cd-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-accent, #6366f1);
    min-width: 2ch;
    text-align: center;
}
.vl-cd-label {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.vl-cd-sep {
    font-size: 2rem;
    font-weight: 700;
    color: #9ca3af;
    line-height: 1;
    padding-top: 12px;
}
.vl-chart-legend {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 10px;
}
