/* ===== Simple Polls – Modernes Design ===== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600;700;800&family=DM+Sans:wght@400;500&display=swap');

:root {
    --sp-accent:      #f5c842;
    --sp-accent-dark: #d4a800;
    --sp-surface:     #1a1a1a;
    --sp-border:      #2a2a2a;
    --sp-text:        #f0f0f0;
    --sp-muted:       #888;
    --sp-success:     #3ecf8e;
    --sp-radius:      14px;
    --sp-transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wrapper ──────────────────────────────── */
.sp-poll-wrap {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    margin: 28px auto;
    font-family: 'DM Sans', sans-serif;
    color: var(--sp-text);
    box-shadow: 0 0 0 1px #ffffff08, 0 8px 40px rgba(0,0,0,0.45);
    position: relative;
    overflow: hidden;
}

.sp-poll-wrap::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,200,66,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Frage ────────────────────────────────── */
.sp-question {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 24px 0;
    color: #fff;
    letter-spacing: -0.02em;
}

/* ── Formular ─────────────────────────────── */
.sp-poll-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Optionen als Karten ──────────────────── */
.sp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #111;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius);
    cursor: pointer;
    transition: border-color var(--sp-transition), background var(--sp-transition), transform var(--sp-transition);
    font-size: 0.97rem;
    font-weight: 500;
    color: var(--sp-text);
    user-select: none;
}

.sp-option:hover {
    border-color: var(--sp-accent);
    background: #1e1a06;
    transform: translateX(3px);
}

/* Custom Radio / Checkbox */
.sp-option input[type="radio"],
.sp-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px; min-width: 20px;
    border: 2px solid #444;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--sp-transition), background var(--sp-transition);
    position: relative;
    flex-shrink: 0;
}
.sp-option input[type="checkbox"] { border-radius: 6px; }

.sp-option input[type="radio"]:checked,
.sp-option input[type="checkbox"]:checked {
    border-color: var(--sp-accent);
    background: var(--sp-accent);
}

.sp-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 7px; height: 7px;
    background: #111;
    border-radius: 50%;
}

.sp-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    color: #111;
    font-weight: 900;
    line-height: 1;
}

/* Gewählte Option leuchtet */
.sp-option:has(input:checked) {
    border-color: var(--sp-accent);
    background: #1e1a06;
}

/* ── Eigene Antwort ───────────────────────── */
.sp-custom-answer { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }

.sp-custom-answer label {
    font-size: 0.82rem;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sp-custom-input {
    padding: 12px 16px;
    background: #111;
    border: 1.5px solid var(--sp-border);
    border-radius: var(--sp-radius);
    color: var(--sp-text);
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    box-sizing: border-box;
    transition: border-color var(--sp-transition), box-shadow var(--sp-transition);
}
.sp-custom-input::placeholder { color: #555; }
.sp-custom-input:focus {
    outline: none;
    border-color: var(--sp-accent);
    box-shadow: 0 0 0 3px rgba(245,200,66,0.12);
}

/* ── Button ───────────────────────────────── */
.sp-submit-btn {
    margin-top: 6px;
    background: var(--sp-accent);
    color: #111;
    border: none;
    border-radius: var(--sp-radius);
    padding: 14px 28px;
    font-size: 0.97rem;
    font-weight: 700;
    font-family: 'Bricolage Grotesque', sans-serif;
    cursor: pointer;
    transition: background var(--sp-transition), transform var(--sp-transition), box-shadow var(--sp-transition);
    align-self: stretch;
    width: 100%;
    text-align: center;
}
.sp-submit-btn:hover {
    background: #ffe066;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,200,66,0.3);
}
.sp-submit-btn:active { transform: translateY(0); }
.sp-submit-btn:disabled {
    background: #333; color: #666;
    cursor: not-allowed; transform: none; box-shadow: none;
}

/* ── Nachrichten ──────────────────────────── */
.sp-message { margin-top: 8px; font-size: 0.88rem; min-height: 18px; }
.sp-message.error   { color: #f87171; }
.sp-message.success { color: var(--sp-success); }

/* ── Status-Notices ───────────────────────── */
.sp-voted-notice,
.sp-inactive-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--sp-radius);
    margin-bottom: 20px;
    font-size: 0.93rem;
    font-weight: 500;
}
.sp-voted-notice {
    background: rgba(62,207,142,0.1);
    color: var(--sp-success);
    border: 1px solid rgba(62,207,142,0.25);
}
.sp-inactive-notice {
    background: rgba(245,200,66,0.08);
    color: var(--sp-accent);
    border: 1px solid rgba(245,200,66,0.2);
}
.sp-no-poll { color: var(--sp-muted); font-style: italic; font-size: 0.9rem; }

/* ── Ergebnisse ───────────────────────────── */
.sp-results { margin-top: 4px; }

.sp-total {
    font-size: 0.82rem;
    color: var(--sp-muted);
    margin: 0 0 18px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sp-total strong { color: var(--sp-accent); }

.sp-result-row { margin-bottom: 14px; }

.sp-result-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.sp-result-label { font-size: 0.93rem; color: var(--sp-text); font-weight: 500; }
.sp-result-pct   { font-size: 0.82rem; color: var(--sp-muted); flex-shrink: 0; }

.sp-bar-wrap {
    background: #1f1f1f;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
}
.sp-bar {
    background: linear-gradient(90deg, var(--sp-accent-dark), var(--sp-accent));
    height: 100%;
    border-radius: 6px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 480px) {
    .sp-poll-wrap { padding: 22px 18px; border-radius: 16px; }
    .sp-question  { font-size: 1.2rem; }
}
