.wbs-poll .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wbs-poll {
    width: 100%;
    max-width: 760px;
    margin: 22px auto;
    font-family: inherit;
    color: #1d2c21;
    contain: none;
}

.wbs-poll--wide { max-width: 100%; }
.wbs-poll--compact { max-width: 460px; margin: 12px auto; }

.wbs-poll__card {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid rgba(28, 188, 30, .13);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(28, 188, 30, .11), transparent 36%),
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,252,250,.96)),
        var(--wbs-poll-bg, #ffffff);
    box-shadow: 0 20px 50px rgba(20, 43, 22, .09);
}

.wbs-poll__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 9px;
    padding: 5px 12px;
    border: 1px solid rgba(28, 188, 30, .16);
    border-radius: 999px;
    background: rgba(28, 188, 30, .09);
    color: var(--wbs-green-dark, #138b15);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}

.wbs-poll__question {
    margin: 0 0 14px;
    color: #11351b;
    font-size: clamp(23px, 3.3vw, 34px);
    line-height: 1.12;
    letter-spacing: -.03em;
}

.wbs-poll--compact .wbs-poll__question { font-size: clamp(21px, 5vw, 28px); }

.wbs-poll__fieldset { margin: 0; padding: 0; border: 0; }
.wbs-poll__answers { display: grid; gap: 8px; }
.wbs-poll__answer { display: block; cursor: pointer; }
.wbs-poll__radio { position: absolute; opacity: 0; pointer-events: none; }

.wbs-poll__answer-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 13px;
    border: 1px solid rgba(17, 53, 27, .08);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 20px rgba(17, 48, 20, .06);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}

.wbs-poll__answer:hover .wbs-poll__answer-card {
    transform: translateY(-2px);
    border-color: rgba(28, 188, 30, .34);
    box-shadow: 0 12px 26px rgba(18, 86, 25, .11);
}

.wbs-poll__radio:focus-visible + .wbs-poll__answer-card {
    outline: 3px solid rgba(28, 188, 30, .22);
    outline-offset: 2px;
}

.wbs-poll__radio:checked + .wbs-poll__answer-card {
    border-color: rgba(28, 188, 30, .56);
    background: linear-gradient(90deg, rgba(28, 188, 30, .10), rgba(255,255,255,.98) 72%);
    box-shadow: 0 14px 30px rgba(18, 86, 25, .14);
}

.wbs-poll__answer-index {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    background: #eff4ef;
    color: #5b6f61;
    font-size: 13px;
    font-weight: 800;
}

.wbs-poll__radio:checked + .wbs-poll__answer-card .wbs-poll__answer-index {
    background: var(--wbs-green-main, #1cbc1e);
    color: #fff;
}

.wbs-poll__answer-text {
    font-size: 17px;
    line-height: 1.28;
}

.wbs-poll__check {
    color: var(--wbs-green-main, #1cbc1e);
    font-size: 23px;
    font-weight: 900;
    opacity: 0;
    transform: scale(.72);
    transition: opacity .16s ease, transform .16s ease;
}

.wbs-poll__radio:checked + .wbs-poll__answer-card .wbs-poll__check {
    opacity: 1;
    transform: scale(1);
}

.wbs-poll__hint {
    margin: -4px 0 14px;
    color: #58705f;
    font-size: 14px;
}

.wbs-poll__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.wbs-poll__preview,
.wbs-poll__back,
.wbs-poll__error button {
    min-height: 46px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.wbs-poll__preview,
.wbs-poll__back {
    padding: 8px 4px;
    border: 0;
    background: transparent;
    color: var(--wbs-green-dark, #138b15);
}

.wbs-poll__preview:hover,
.wbs-poll__back:hover { text-decoration: underline; }

.wbs-poll__message {
    min-height: 22px;
    margin-top: 10px;
    color: #2d6f2f;
    font-size: 14px;
    font-weight: 700;
}

.wbs-poll__notice {
    margin: -4px 0 16px;
    padding: 10px 13px;
    border-radius: 11px;
    background: #fff7d9;
    color: #725b00;
    font-size: 14px;
}

.wbs-poll__success {
    margin: -3px 0 17px;
    padding: 11px 14px;
    border: 1px solid rgba(28, 188, 30, .12);
    border-radius: 12px;
    background: rgba(28, 188, 30, .10);
    color: var(--wbs-green-dark, #138b15);
    font-weight: 800;
}

.wbs-poll__results { display: grid; gap: 9px; }

.wbs-poll__result {
    padding: 12px 14px 11px;
    border: 1px solid rgba(17, 53, 27, .10);
    border-radius: 16px;
    background: rgba(255,255,255,.92);
}

.wbs-poll__result.is-selected {
    border: 2px solid var(--wbs-green-main, #1cbc1e);
    background: linear-gradient(90deg, rgba(28, 188, 30, .15), rgba(255,255,255,.98));
    box-shadow: 0 12px 28px rgba(28, 188, 30, .16);
}

.wbs-poll__result-top {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
}

.wbs-poll__percent {
    color: var(--wbs-green-dark, #138b15);
    font-size: 19px;
}

.wbs-poll__result-text { line-height: 1.3; }

.wbs-poll__result-check {
    justify-self: end;
    color: var(--wbs-green-main, #1cbc1e);
    font-size: 25px;
    font-weight: 950;
    line-height: 1;
}

.wbs-poll__track {
    height: 10px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e1e8e1;
}

.wbs-poll__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--wbs-green-bright, #42d941), var(--wbs-green-main, #1cbc1e));
    transition: width .7s cubic-bezier(.22,.61,.36,1);
}

.wbs-poll__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.wbs-poll__total {
    margin-left: auto;
    color: #4f6656;
    font-size: 14px;
}

.wbs-poll__total strong {
    color: #163620;
    font-size: 17px;
}

/* Gęstszy układ widżetu i wersji kompaktowej. */
.wbs-poll--compact .wbs-poll__card {
    padding: 17px 18px 16px;
    border-radius: 18px;
}

.wbs-poll--compact .wbs-poll__eyebrow {
    min-height: 25px;
    margin-bottom: 8px;
    padding: 4px 10px;
}

.wbs-poll--compact .wbs-poll__question {
    margin-bottom: 12px;
    line-height: 1.1;
}

.wbs-poll--compact .wbs-poll__answers,
.wbs-poll--compact .wbs-poll__results {
    gap: 7px;
}

.wbs-poll--compact .wbs-poll__answer-card {
    min-height: 52px;
    padding: 8px 11px;
    border-radius: 13px;
}

.wbs-poll--compact .wbs-poll__result {
    padding: 10px 12px 9px;
    border-radius: 13px;
}

.wbs-poll--compact .wbs-poll__track {
    height: 8px;
    margin-top: 7px;
}

.wbs-poll--compact .wbs-poll__footer {
    margin-top: 10px;
}

.wbs-poll.is-submitting .wbs-poll__answer {
    pointer-events: none;
}

.wbs-poll.is-submitting .wbs-poll__answer-card {
    opacity: .58;
}

.wbs-poll.is-submitting .wbs-poll__radio:checked + .wbs-poll__answer-card {
    opacity: 1;
    border-color: var(--wbs-green-main, #1cbc1e);
    box-shadow: 0 14px 32px rgba(28, 188, 30, .18);
}

.wbs-poll__skeleton {
    min-height: 250px;
    padding: 25px;
    border-radius: 20px;
    background: var(--wbs-poll-bg, #ffffff);
    box-shadow: 0 14px 36px rgba(25, 61, 43, .08);
}

.wbs-poll__skeleton span {
    display: block;
    height: 54px;
    margin: 10px 0;
    border-radius: 11px;
    background: linear-gradient(90deg,#e6efe6 25%,#f7fbf7 50%,#e6efe6 75%);
    background-size: 200% 100%;
    animation: wbs-shimmer 1.2s infinite;
}

.wbs-poll__skeleton span:first-child {
    width: 72%;
    height: 30px;
    margin-bottom: 20px;
}

.wbs-poll__error {
    display: grid;
    justify-items: start;
    gap: 12px;
    padding: 20px;
    border-radius: 16px;
    background: #fff2f2;
    color: #742b2b;
}

.wbs-poll__error button {
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    background: #742b2b;
    color: #fff;
}

@keyframes wbs-shimmer { to { background-position: -200% 0; } }

@media (max-width: 620px) {
    .wbs-poll { margin: 14px auto; }
    .wbs-poll__card { padding: 17px 15px 16px; border-radius: 17px; }
    .wbs-poll__question { margin-bottom: 12px; font-size: 25px; }
    .wbs-poll__answer-card {
        grid-template-columns: 30px minmax(0, 1fr) 24px;
        min-height: 54px;
        padding: 9px 11px;
        gap: 9px;
    }
    .wbs-poll__answer-text { font-size: 16px; }
    .wbs-poll__results { gap: 7px; }
    .wbs-poll__result { padding: 10px 12px 9px; border-radius: 13px; }
    .wbs-poll__track { height: 8px; margin-top: 7px; }
    .wbs-poll__footer { margin-top: 10px; }
    .wbs-poll__preview { width: 100%; min-height: 36px; }
    .wbs-poll__result-top { grid-template-columns: 56px minmax(0,1fr) 24px; }
    .wbs-poll__result-check { grid-column: auto; justify-self: end; }
    .wbs-poll__footer { align-items: flex-end; flex-direction: column-reverse; }
    .wbs-poll__total { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .wbs-poll *, .wbs-poll *::before, .wbs-poll *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Ankieta osadzona w newsie jest zwykłym blokiem w treści.
   Na desktopie pozostaje wyśrodkowana, a tekst i reklamy jej nie opływają. */
.wbs-poll--article-centered {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 760px !important;
    margin: 28px auto !important;
}

@media (max-width: 620px) {
    .wbs-poll--article-centered {
        margin: 18px auto !important;
    }
}


/* Serwerowa treść awaryjna pozostaje czytelna dla użytkownika i wyszukiwarki,
   zanim aktualny stan zostanie pobrany przez REST API. */
.wbs-poll__fallback-answers {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wbs-poll__fallback-answers li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 9px 13px;
    border: 1px solid rgba(17, 53, 27, .08);
    border-radius: 15px;
    background: rgba(255,255,255,.96);
}

.wbs-poll__fallback-note {
    margin: 10px 0 0;
    color: #58705f;
    font-size: 13px;
}
