/**
 * Rudy Forum Premium — Polls
 *
 * @package Rudy_Forum_Premium
 * @since   0.2.0
 */

/* ── Poll container (topic-pagina) ──────────────────────────────────────────── */

.rfp-poll {
    background: var(--rfl-bg, #f8fafc);
    border: 1px solid var(--rfl-border, #e2e8f0);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 560px;
}

.rfp-poll-question {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rfl-text, #1e293b);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* ── Stemformulier ──────────────────────────────────────────────────────────── */

.rfp-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1rem;
}

.rfp-poll-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--rfl-border, #e2e8f0);
    border-radius: 6px;
    cursor: pointer;
    background: var(--rfl-bg-white, #fff);
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.9rem;
    color: var(--rfl-text, #1e293b);
}

.rfp-poll-option:hover {
    border-color: var(--rfl-primary, #0073aa);
    background: var(--rfl-primary-light, #e8f4fa);
}

.rfp-poll-option input[type="radio"] {
    accent-color: var(--rfl-primary, #0073aa);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}

.rfp-poll-vote-btn {
    margin-top: 0.25rem;
}

/* ── Resultaten ─────────────────────────────────────────────────────────────── */

.rfp-poll-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.rfp-poll-result-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    align-items: center;
}

.rfp-poll-result-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.875rem;
    color: var(--rfl-text, #1e293b);
    font-weight: 500;
}

.rfp-poll-result-row--chosen .rfp-poll-result-label {
    color: var(--rfl-primary, #0073aa);
    font-weight: 700;
}

.rfp-poll-checkmark {
    color: var(--rfl-primary, #0073aa);
    font-weight: 900;
    margin-right: 2px;
}

.rfp-poll-bar-wrap {
    grid-column: 1;
    grid-row: 2;
    height: 10px;
    background: var(--rfl-border, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
}

.rfp-poll-bar {
    height: 100%;
    background: var(--rfl-primary, #0073aa);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.rfp-poll-result-row--chosen .rfp-poll-bar {
    background: var(--rfl-primary, #0073aa);
    opacity: 1;
}

.rfp-poll-result-count {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 0.8rem;
    color: var(--rfl-text-muted, #64748b);
    text-align: right;
    white-space: nowrap;
}

.rfp-poll-vote-count {
    font-size: 0.75rem;
    color: var(--rfl-text-muted, #64748b);
}

/* ── Stemmeta (totaal) ──────────────────────────────────────────────────────── */

.rfp-poll-meta {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--rfl-text-muted, #64748b);
    border-top: 1px solid var(--rfl-border, #e2e8f0);
    padding-top: 0.5rem;
}

/* ── Poll-builder (in formulier) ────────────────────────────────────────────── */

.rfp-poll-builder {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rfl-border, #e2e8f0);
}

.rfp-poll-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rfp-poll-toggle-wrap input[type="checkbox"] {
    accent-color: var(--rfl-primary, #0073aa);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.rfp-poll-toggle-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rfl-text, #1e293b);
    cursor: pointer;
}

.rfp-poll-editor {
    margin-top: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--rfl-bg-white, #fff);
    border: 1px solid var(--rfl-border, #e2e8f0);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.rfp-poll-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rfl-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.rfp-poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rfp-poll-option-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rfp-poll-option-input {
    flex: 1;
}

.rfp-poll-remove-option {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--rfl-border, #e2e8f0);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--rfl-text-muted, #64748b);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
    line-height: 1;
}

.rfp-poll-remove-option:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.rfp-poll-remove-option:disabled {
    opacity: 0.3;
    cursor: default;
}

.rfp-poll-add-option {
    align-self: flex-start;
    background: none;
    border: 1px dashed var(--rfl-border, #e2e8f0);
    border-radius: 4px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    color: var(--rfl-primary, #0073aa);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.rfp-poll-add-option:hover {
    background: var(--rfl-primary-light, #e8f4fa);
    border-color: var(--rfl-primary, #0073aa);
}
