/*
 * Umfrage – Frontend
 *
 * Grundgerüst und Maße. Farben, Schriften und der Balken kommen aus den
 * Einstellungen der jeweiligen Umfrage; was dort leer bleibt, erbt das
 * Aussehen vom Theme.
 */

.nvu {
    --nvu-line: rgba(128, 128, 128, .28);
    --nvu-soft: rgba(128, 128, 128, .10);
    --nvu-accent: var(--rs-accent, var(--accent, #2563eb));

    color: inherit;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 18px;
}

.nvu * { box-sizing: border-box; }

/* ------------------------------------------------------------- Texte */

.nvu-question {
    margin: 0 0 8px;
    font-size: 1.15em;
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
}

.nvu-intro { margin: 0 0 12px; }
.nvu-intro > :first-child { margin-top: 0; }
.nvu-intro > :last-child { margin-bottom: 0; }

.nvu-period {
    margin: 10px 0 0;
    font-size: .82em;
    opacity: .75;
}

.nvu-hint {
    margin: 8px 0 0;
    font-size: .84em;
    opacity: .8;
}

.nvu-total {
    margin: 12px 0 0;
    font-size: .88em;
    opacity: .85;
}

.nvu-count { font-weight: 400; opacity: .8; }

/* ------------------------------------------------------------ Listen */

.nvu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nvu-row { margin-top: 10px; }
.nvu-row:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

/* Auswahl */

.nvu-choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.nvu-choice input {
    margin: 0;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    accent-color: var(--nvu-accent);
    margin-top: .18em;
}

.nvu-choice .nvu-label {
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 0;
}

/* Ergebnis */

.nvu-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.nvu-line .nvu-label { flex: 1 1 auto; min-width: 0; }

.nvu-percent {
    flex: 0 0 auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nvu-track {
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: rgba(128, 128, 128, .18);
    overflow: hidden;
}

.nvu-fill {
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--nvu-accent);
    transition: width .4s ease;
}

@keyframes nvu-move {
    from { background-position: 0 0; }
    to   { background-position: 32px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nvu-fill { transition: none; animation: none; }
}

/* ------------------------------------------------------ Schaltfläche */

.nvu-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 14px;
}

.nvu-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border: 1px solid var(--nvu-accent);
    border-radius: 8px;
    background: var(--nvu-accent);
    color: #fff;
    font: inherit;
    font-size: .9em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.nvu-btn:hover { filter: brightness(1.08); }

.nvu-link {
    color: var(--nvu-accent);
    text-decoration: none;
    font-size: .88em;
    font-weight: 600;
}

.nvu-link:hover { text-decoration: underline; }

.nvu-more { margin: 12px 0 0; }

/* --------------------------------------------------------- Meldungen */

.nvu-note {
    margin: 0 0 12px;
    padding: 10px 13px;
    border: 1px solid var(--nvu-line);
    border-radius: 9px;
    font-size: .9em;
}

.nvu-note-ok { border-color: rgba(47, 158, 68, .5); background: rgba(47, 158, 68, .10); }
.nvu-note-error { border-color: rgba(224, 49, 49, .5); background: rgba(224, 49, 49, .10); }

/* ------------------------------------------------------- In der Box */

.nvu-box { font-size: 14px; margin: 0; }
.nvu-box .nvu-question { font-size: 1.05em; }
.nvu-box .nvu-actions { margin-top: 11px; }
.nvu-box .nvu-btn { padding: 7px 14px; }

.nova-box .nvu { margin: 0; }

/* ----------------------------------------------------- Alle Umfragen */

.nvu-archive { margin: 0; }

.nvu-archive-item {
    padding: 18px 0;
    border-top: 1px solid var(--nvu-line);
}

.nvu-archive-item:first-child { border-top: 0; padding-top: 0; }

.nvu-archive-state {
    margin: 0 0 6px;
    font-size: .78em;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .7;
}

/* ------------------------------------------------------------ Schmal */

@media (max-width: 520px) {
    .nvu-line { flex-wrap: wrap; gap: 2px 10px; }
    .nvu-percent { flex: 1 1 100%; }
}
