/* Extends picker.css with Live-Vote-specific pieces (live tally bars, results
   modal). Shares the base app shell (.btn, .setup-screen, .camera-screen,
   etc.) from picker.css unchanged. Answer colors match the A/B/C/D palette
   used for the on-camera overlay in response-cards-scanner.js. */

:root {
    --answer-a: #3b82f6;
    --answer-b: #10b981;
    --answer-c: #f59e0b;
    --answer-d: #d946ef;
}

.vote-tally {
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 18px;
}

.vote-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 999px;
    padding: 6px 14px;
}

.vote-bar-label {
    width: 22px;
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.vote-bar[data-answer="A"] .vote-bar-label { color: var(--answer-a); }
.vote-bar[data-answer="B"] .vote-bar-label { color: var(--answer-b); }
.vote-bar[data-answer="C"] .vote-bar-label { color: var(--answer-c); }
.vote-bar[data-answer="D"] .vote-bar-label { color: var(--answer-d); }

.vote-bar-track {
    flex: 1;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.vote-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.2s ease-out;
}

.vote-bar[data-answer="A"] .vote-bar-fill { background: var(--answer-a); }
.vote-bar[data-answer="B"] .vote-bar-fill { background: var(--answer-b); }
.vote-bar[data-answer="C"] .vote-bar-fill { background: var(--answer-c); }
.vote-bar[data-answer="D"] .vote-bar-fill { background: var(--answer-d); }

.vote-bar-count {
    width: 26px;
    text-align: right;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   RESULTS MODAL
   ============================================ */
.vote-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.82);
    padding: 20px;
}

.vote-modal.active {
    display: flex;
}

.vote-modal-card {
    background: white;
    color: #333;
    border-radius: 24px;
    padding: 36px 32px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.vote-modal-label {
    font-size: 1rem;
    font-weight: 700;
    color: #8A4CF5;
    margin-bottom: 20px;
}

.vote-modal-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    text-align: left;
}

.vote-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vote-result-answer {
    width: 26px;
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.vote-answer-A { color: var(--answer-a); }
.vote-answer-B { color: var(--answer-b); }
.vote-answer-C { color: var(--answer-c); }
.vote-answer-D { color: var(--answer-d); }

.vote-result-track {
    flex: 1;
    height: 16px;
    border-radius: 999px;
    background: #eee;
    overflow: hidden;
}

.vote-result-fill {
    height: 100%;
    border-radius: 999px;
}

.vote-answer-bg-A { background: var(--answer-a); }
.vote-answer-bg-B { background: var(--answer-b); }
.vote-answer-bg-C { background: var(--answer-c); }
.vote-answer-bg-D { background: var(--answer-d); }

.vote-result-pct {
    width: 92px;
    text-align: right;
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.vote-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vote-modal-actions .btn-primary {
    background: linear-gradient(135deg, #FFCB2B 0%, #FFA500 100%);
    color: white;
}

.vote-modal-actions .btn-secondary {
    background: #f2f2f2;
    color: #555;
    border: none;
}

@media (max-width: 480px) {
    .vote-modal-card {
        padding: 28px 22px;
    }

    .vote-tally {
        top: 70px;
    }
}
