.bwd-ap-poll {
    --bwd-ap-bg: #ffffff;
    --bwd-ap-text: #182026;
    --bwd-ap-title-color: #182026;
    --bwd-ap-title-size: 20px;
    --bwd-ap-text-color: #182026;
    --bwd-ap-text-size: 16px;
    --bwd-ap-muted: #5f6872;
    --bwd-ap-border: #d9dee4;
    --bwd-ap-soft: #f5f7f9;
    --bwd-ap-primary: #176b87;
    --bwd-ap-primary-strong: #0f4f66;
    --bwd-ap-primary-soft: #e8f5f8;
    --bwd-ap-button-bg: #176b87;
    --bwd-ap-button-text: #ffffff;
    --bwd-ap-button-hover-bg: #0f4f66;
    --bwd-ap-button-hover-text: #ffffff;
    --bwd-ap-button-border-color: #176b87;
    --bwd-ap-button-border-width: 0px;
    --bwd-ap-button-border-radius: 8px;
    --bwd-ap-success: #2f7d57;
    --bwd-ap-warning: #9a6a12;
    --bwd-ap-shadow: 0 18px 45px rgba(24, 32, 38, 0.08);

    background: var(--bwd-ap-bg);
    border: 1px solid var(--bwd-ap-border);
    border-radius: 8px;
    box-shadow: var(--bwd-ap-shadow);
    color: var(--bwd-ap-text-color);
    font-size: var(--bwd-ap-text-size);
    margin: 1.5rem 0;
    max-width: 680px;
    padding: 1.35rem;
}

.bwd-ap-title {
    color: var(--bwd-ap-title-color);
    font-size: var(--bwd-ap-title-size);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1.1rem;
}

.bwd-ap-form {
    margin: 0;
}

.bwd-ap-options {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 1rem;
}

.bwd-ap-option {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    border: 1px solid var(--bwd-ap-border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0.8rem 0.9rem;
    position: relative;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bwd-ap-option:hover {
    border-color: rgba(23, 107, 135, 0.55);
    box-shadow: 0 8px 20px rgba(24, 32, 38, 0.07);
    transform: translateY(-1px);
}

.bwd-ap-option:has(input:checked) {
    background: var(--bwd-ap-primary-soft);
    border-color: var(--bwd-ap-primary);
    box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.12);
}

.bwd-ap-option input[type="radio"],
.bwd-ap-option input[type="checkbox"] {
    accent-color: var(--bwd-ap-primary);
    flex: 0 0 auto;
    height: 18px;
    margin: 0;
    width: 18px;
}

.bwd-ap-option input[type="radio"]:focus-visible,
.bwd-ap-option input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--bwd-ap-primary);
    outline-offset: 3px;
}

.bwd-ap-option span {
    color: var(--bwd-ap-text-color);
    font-size: inherit;
    line-height: 1.35;
}

.bwd-ap-option-custom {
    flex-wrap: wrap;
}

.bwd-ap-custom-choice {
    border: 1px solid var(--bwd-ap-border);
    border-radius: 6px;
    color: var(--bwd-ap-text-color);
    flex: 1 0 100%;
    font-size: 0.95rem;
    min-height: 38px;
    padding: 0.45rem 0.6rem;
    width: 100%;
}

.bwd-ap-option-custom input[name="option_ids[]"]:not(:checked) ~ .bwd-ap-custom-choice {
    display: none;
}

.bwd-ap-custom-choice:disabled {
    background: #f0f3f6;
    cursor: not-allowed;
    opacity: 0.75;
}

.bwd-ap-form-disabled .bwd-ap-option {
    cursor: default;
    opacity: 0.78;
    transform: none;
}

.bwd-ap-form-disabled .bwd-ap-option:hover {
    border-color: var(--bwd-ap-border);
    box-shadow: none;
    transform: none;
}

.bwd-ap-button {
    align-items: center;
    background: var(--bwd-ap-button-bg);
    border: var(--bwd-ap-button-border-width) solid var(--bwd-ap-button-border-color);
    border-radius: var(--bwd-ap-button-border-radius);
    box-shadow: 0 10px 20px rgba(23, 107, 135, 0.22);
    color: var(--bwd-ap-button-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 44px;
    min-width: 112px;
    padding: 0.75rem 1.15rem;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bwd-ap-button:hover {
    background: var(--bwd-ap-button-hover-bg);
    box-shadow: 0 12px 24px rgba(15, 79, 102, 0.24);
    color: var(--bwd-ap-button-hover-text);
    transform: translateY(-1px);
}

.bwd-ap-button:focus-visible {
    outline: 3px solid rgba(23, 107, 135, 0.25);
    outline-offset: 3px;
}

.bwd-ap-button:disabled {
    box-shadow: none;
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.bwd-ap-message,
.bwd-ap-notice,
.bwd-ap-disclosure {
    background: var(--bwd-ap-soft);
    border: 1px solid transparent;
    border-left: 4px solid var(--bwd-ap-primary);
    border-radius: 8px;
    color: var(--bwd-ap-text-color);
    line-height: 1.45;
    margin: 1rem 0 0;
    padding: 0.8rem 0.9rem;
}

.bwd-ap-message {
    border-left-color: var(--bwd-ap-success);
}

.bwd-ap-disclosure {
    border-left-color: var(--bwd-ap-warning);
    color: var(--bwd-ap-muted);
    font-size: 0.92rem;
}

.bwd-ap-results {
    display: grid;
    gap: 1rem;
    margin-top: 1.05rem;
}

.bwd-ap-result {
    background: #fbfcfd;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    padding: 0.85rem;
}

.bwd-ap-result-row {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.bwd-ap-result-row span {
    color: var(--bwd-ap-text-color);
    font-weight: 650;
    line-height: 1.3;
}

.bwd-ap-result-row strong {
    color: var(--bwd-ap-primary-strong);
    font-size: 1.05rem;
    white-space: nowrap;
}

.bwd-ap-result small {
    color: var(--bwd-ap-muted);
    display: block;
    margin-top: 0.35rem;
}

.bwd-ap-bar {
    background: #e9edf1;
    border-radius: 999px;
    height: 12px;
    margin: 0.55rem 0 0.2rem;
    overflow: hidden;
}

.bwd-ap-bar span {
    background: linear-gradient(90deg, var(--bwd-ap-primary) 0%, #43a6a8 100%);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 3px;
}

.bwd-ap-turnstile {
    margin: 0.75rem 0 1rem;
}

.bwd-ap-turnstile-message {
    color: var(--bwd-ap-muted);
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 1rem 0 0.5rem;
}

@media (max-width: 520px) {
    .bwd-ap-poll {
        border-radius: 8px;
        padding: 1rem;
    }

    .bwd-ap-title {
    font-size: var(--bwd-ap-title-size);
    }

    .bwd-ap-option {
        min-height: 46px;
        padding: 0.75rem;
    }

    .bwd-ap-button {
        width: 100%;
    }

    .bwd-ap-result-row {
        align-items: flex-start;
    }
}
