/*
  Radikal belediye anket widget tasarımı
  Mevcut HTML, class ve etiket yapısı korunarak yalnızca CSS yeniden yazıldı.
  Admin arayüzündeki koyu civic command-center diline uyumlu tasarım.
*/

:root {
    --kb-poll-brand: #00d6a3;
    --kb-poll-brand-2: #57ffcf;
    --kb-poll-blue: #367dff;
    --kb-poll-gold: #ffcf5a;
    --kb-poll-danger: #ff4d6d;
    --kb-poll-success: #2ff3a2;
    --kb-poll-bg: #06111d;
    --kb-poll-bg-2: #081f32;
    --kb-poll-surface: rgba(8, 28, 44, .78);
    --kb-poll-surface-2: rgba(18, 54, 78, .66);
    --kb-poll-line: rgba(168, 255, 232, .18);
    --kb-poll-line-strong: rgba(87, 255, 207, .34);
    --kb-poll-text: #f7fffd;
    --kb-poll-soft-text: #b4c8d2;
    --kb-poll-muted: #8fa9b7;
    --kb-poll-shadow: 0 0 0 1px rgba(87, 255, 207, .18), 0 30px 110px rgba(0, 214, 163, .18);
    --kb-poll-shadow-soft: 0 22px 70px rgba(0, 0, 0, .34);
    --kb-poll-radius-xl: 42px;
    --kb-poll-radius-lg: 28px;
    --kb-poll-radius-md: 18px;
    --kb-poll-radius-sm: 12px;
    --kb-poll-ease: cubic-bezier(.2, .8, .2, 1);
}

.kb-poll,
.kb-poll * {
    box-sizing: border-box;
}

.kb-poll-embed-page {
    position: relative;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    padding: clamp(14px, 4vw, 56px);
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 214, 163, .24), transparent 28rem),
        radial-gradient(circle at 94% 20%, rgba(54, 125, 255, .2), transparent 30rem),
        radial-gradient(circle at 50% 104%, rgba(255, 207, 90, .13), transparent 28rem),
        linear-gradient(145deg, var(--kb-poll-bg), var(--kb-poll-bg-2) 54%, #020710);
    color: var(--kb-poll-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "liga";
    color-scheme: dark;
}

.kb-poll-embed-page::before,
.kb-poll-embed-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.kb-poll-embed-page::before {
    z-index: 0;
    opacity: .34;
    background-image:
        linear-gradient(rgba(87, 255, 207, .075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(87, 255, 207, .075) 1px, transparent 1px);
    background-size: 52px 52px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0 58%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 0 58%, transparent 96%);
}

.kb-poll-embed-page::after {
    z-index: 1;
    background:
        linear-gradient(112deg, transparent 0 18%, rgba(87, 255, 207, .07) 18% 19%, transparent 19% 64%, rgba(255,255,255,.045) 64% 65%, transparent 65%),
        repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px);
    mix-blend-mode: screen;
    opacity: .42;
}

.kb-poll {
    position: relative;
    z-index: 2;
    width: min(100%, 860px);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--kb-poll-line);
    border-radius: clamp(28px, 5vw, var(--kb-poll-radius-xl));
    background:
        linear-gradient(150deg, rgba(6, 17, 29, .96), rgba(11, 40, 61, .82)),
        radial-gradient(circle at 80% 8%, rgba(87, 255, 207, .25), transparent 21rem);
    box-shadow: var(--kb-poll-shadow), var(--kb-poll-shadow-soft);
    color: var(--kb-poll-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    padding: clamp(18px, 4.8vw, 48px);
    transform: translateZ(0);
}

.kb-poll::before {
    content: "";
    position: absolute;
    inset: -34% -18% auto auto;
    width: min(58vw, 460px);
    aspect-ratio: 1;
    border-radius: 999px;
    background: conic-gradient(from 180deg, transparent, rgba(87, 255, 207, .44), transparent 42%, rgba(54, 125, 255, .26), transparent 76%);
    filter: blur(12px);
    opacity: .7;
    z-index: -1;
}

.kb-poll::after {
    content: "";
    position: absolute;
    right: clamp(18px, 5vw, 64px);
    top: clamp(72px, 13vw, 132px);
    width: min(48vw, 460px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(87, 255, 207, .75), transparent);
    box-shadow:
        0 54px 0 rgba(87, 255, 207, .1),
        0 108px 0 rgba(87, 255, 207, .055),
        0 162px 0 rgba(255, 255, 255, .04);
    transform: rotate(-8deg);
    z-index: -1;
}

.kb-poll__head {
    position: relative;
    display: grid;
    gap: clamp(10px, 1.8vw, 16px);
    margin-bottom: clamp(20px, 4vw, 36px);
    padding-bottom: clamp(18px, 3vw, 28px);
    border-bottom: 1px solid rgba(168, 255, 232, .14);
}

.kb-poll__head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: min(45%, 260px);
    height: 1px;
    background: linear-gradient(90deg, var(--kb-poll-brand-2), transparent);
    box-shadow: 0 0 20px rgba(87, 255, 207, .75);
}

.kb-poll__eyebrow {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(87, 255, 207, .28);
    border-radius: 999px;
    background: rgba(87, 255, 207, .09);
    color: var(--kb-poll-brand-2);
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .16em;
    text-transform: uppercase;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.kb-poll__eyebrow::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--kb-poll-brand-2);
    box-shadow: 0 0 18px rgba(87, 255, 207, .95);
}

.kb-poll h2 {
    max-width: 760px;
    margin: 0;
    color: var(--kb-poll-text);
    font-size: clamp(34px, 7vw, 78px);
    font-weight: 950;
    line-height: .94;
    letter-spacing: -.06em;
    text-wrap: balance;
}

.kb-poll__intro {
    max-width: 62ch;
    margin: 0;
    color: var(--kb-poll-soft-text);
    font-size: clamp(14px, 1.9vw, 17px);
    line-height: 1.7;
}

.kb-poll fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.kb-poll legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    color: var(--kb-poll-text);
    font-size: clamp(21px, 3vw, 34px);
    font-weight: 930;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.kb-poll__description {
    max-width: 68ch;
    margin: 0 0 clamp(18px, 3vw, 28px);
    color: var(--kb-poll-soft-text);
    font-size: clamp(14px, 1.8vw, 16px);
    line-height: 1.7;
}

.kb-poll__notice,
.kb-poll__empty {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid rgba(168, 255, 232, .18);
    border-radius: var(--kb-poll-radius-md);
    background: rgba(255, 255, 255, .06);
    color: var(--kb-poll-text);
    padding: 14px 16px 14px 48px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.45;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.kb-poll__notice::before,
.kb-poll__empty::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 17px;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: var(--kb-poll-brand-2);
    box-shadow: 0 0 18px rgba(87, 255, 207, .9);
}

.kb-poll__notice--success {
    border-color: rgba(47, 243, 162, .34);
    background: linear-gradient(135deg, rgba(47, 243, 162, .16), rgba(255,255,255,.055));
    color: #dffef2;
}

.kb-poll__notice--success::before {
    background: var(--kb-poll-success);
    box-shadow: 0 0 18px rgba(47, 243, 162, .9);
}

.kb-poll__notice--error {
    border-color: rgba(255, 77, 109, .36);
    background: linear-gradient(135deg, rgba(255, 77, 109, .17), rgba(255,255,255,.055));
    color: #ffe5eb;
}

.kb-poll__notice--error::before {
    background: var(--kb-poll-danger);
    box-shadow: 0 0 18px rgba(255, 77, 109, .9);
}

.kb-poll__empty {
    border-style: dashed;
    color: var(--kb-poll-soft-text);
}

.kb-poll__options {
    display: grid;
    gap: clamp(12px, 2vw, 16px);
    counter-reset: kb-option;
}

.kb-poll__option {
    position: relative;
    display: grid;
    gap: 13px;
    min-width: 0;
    overflow: hidden;
    counter-increment: kb-option;
    border: 1px solid rgba(168, 255, 232, .15);
    border-radius: var(--kb-poll-radius-lg);
    background:
        linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)),
        radial-gradient(circle at 100% 0, rgba(87, 255, 207, .13), transparent 13rem);
    padding: clamp(14px, 2.6vw, 22px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform .24s var(--kb-poll-ease), border-color .24s var(--kb-poll-ease), background .24s var(--kb-poll-ease), box-shadow .24s var(--kb-poll-ease);
}

.kb-poll__option::before {
    content: counter(kb-option, decimal-leading-zero);
    position: absolute;
    right: 16px;
    top: 14px;
    color: rgba(87, 255, 207, .2);
    font-size: clamp(26px, 5vw, 52px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.08em;
    pointer-events: none;
}

.kb-poll__option::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(87, 255, 207, .42), transparent);
    opacity: 0;
    transition: opacity .24s var(--kb-poll-ease);
}

.kb-poll__option:hover,
.kb-poll__option:focus-within {
    transform: translateY(-3px);
    border-color: rgba(87, 255, 207, .36);
    background:
        linear-gradient(135deg, rgba(87, 255, 207, .13), rgba(255,255,255,.045)),
        radial-gradient(circle at 100% 0, rgba(87, 255, 207, .22), transparent 14rem);
    box-shadow: 0 0 0 1px rgba(87, 255, 207, .1), 0 22px 58px rgba(0, 214, 163, .13);
}

.kb-poll__option:hover::after,
.kb-poll__option:focus-within::after {
    opacity: 1;
}

.kb-poll__choice {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
    color: var(--kb-poll-text);
    font-size: clamp(15px, 1.9vw, 17px);
    font-weight: 850;
    line-height: 1.45;
    letter-spacing: -.01em;
    cursor: pointer;
}

.kb-poll__choice input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    border: 1px solid rgba(168, 255, 232, .38);
    border-radius: 999px;
    background: rgba(2, 7, 16, .56);
    box-shadow: inset 0 0 0 5px rgba(2, 7, 16, .72), 0 0 0 0 rgba(87, 255, 207, 0);
    cursor: pointer;
    transition: border-color .2s var(--kb-poll-ease), background .2s var(--kb-poll-ease), box-shadow .2s var(--kb-poll-ease), transform .2s var(--kb-poll-ease);
}

.kb-poll__choice input:hover {
    border-color: var(--kb-poll-brand-2);
    transform: scale(1.05);
}

.kb-poll__choice input:checked {
    border-color: var(--kb-poll-brand-2);
    background: var(--kb-poll-brand-2);
    box-shadow: inset 0 0 0 5px #06111d, 0 0 0 6px rgba(87, 255, 207, .12), 0 0 28px rgba(87, 255, 207, .65);
}

.kb-poll__choice input:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 5px #06111d, 0 0 0 6px rgba(87, 255, 207, .2), 0 0 28px rgba(87, 255, 207, .68);
}

.kb-poll__result {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: var(--kb-poll-soft-text);
    font-size: 13px;
    font-weight: 830;
}

.kb-poll__result > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kb-poll__result > span:last-child {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(87, 255, 207, .18);
    border-radius: 999px;
    background: rgba(87, 255, 207, .08);
    color: var(--kb-poll-brand-2);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.kb-poll__bar {
    grid-column: 1 / -1;
    position: relative;
    height: 12px;
    overflow: hidden;
    border: 1px solid rgba(168, 255, 232, .14);
    border-radius: 999px;
    background: rgba(2, 7, 16, .48);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, .34);
}

.kb-poll__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 18px 100%;
    opacity: .32;
}

.kb-poll__bar span {
    position: relative;
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--kb-poll-brand), var(--kb-poll-brand-2), var(--kb-poll-blue));
    box-shadow: 0 0 24px rgba(87, 255, 207, .58);
}

.kb-poll__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: clamp(20px, 4vw, 34px);
    padding-top: clamp(18px, 3vw, 28px);
    border-top: 1px solid rgba(168, 255, 232, .14);
}

.kb-poll__foot button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    overflow: hidden;
    border: 1px solid rgba(87, 255, 207, .38);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(87, 255, 207, .98), rgba(0, 214, 163, .9) 48%, rgba(54, 125, 255, .86));
    color: #021018;
    padding: 14px 24px;
    font: inherit;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
    box-shadow: 0 0 0 1px rgba(87, 255, 207, .16), 0 18px 44px rgba(0, 214, 163, .25);
    cursor: pointer;
    transition: transform .22s var(--kb-poll-ease), box-shadow .22s var(--kb-poll-ease), filter .22s var(--kb-poll-ease);
}

.kb-poll__foot button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 0 34%, rgba(255,255,255,.45) 50%, transparent 66% 100%);
    transform: translateX(-120%);
    transition: transform .55s var(--kb-poll-ease);
}

.kb-poll__foot button:hover {
    transform: translateY(-2px);
    filter: saturate(1.12) brightness(1.04);
    box-shadow: 0 0 0 1px rgba(87, 255, 207, .28), 0 26px 70px rgba(0, 214, 163, .34);
}

.kb-poll__foot button:hover::before {
    transform: translateX(120%);
}

.kb-poll__foot button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 5px rgba(87, 255, 207, .2), 0 26px 70px rgba(0, 214, 163, .34);
}

.kb-poll__foot button:disabled {
    cursor: not-allowed;
    opacity: .46;
    filter: grayscale(.3);
    transform: none;
    box-shadow: none;
}

.kb-poll__foot span {
    max-width: 34ch;
    color: var(--kb-poll-muted);
    font-size: 13px;
    font-weight: 780;
    line-height: 1.45;
    text-align: right;
}

.kb-poll__visitors {
    position: relative;
    display: grid;
    gap: clamp(14px, 2.4vw, 20px);
    margin-top: clamp(20px, 4vw, 34px);
    overflow: hidden;
    border: 1px solid rgba(168, 255, 232, .16);
    border-radius: var(--kb-poll-radius-lg);
    background:
        linear-gradient(140deg, rgba(255,255,255,.075), rgba(255,255,255,.028)),
        radial-gradient(circle at 14% 0, rgba(255, 207, 90, .13), transparent 13rem),
        radial-gradient(circle at 100% 100%, rgba(87, 255, 207, .12), transparent 14rem);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.kb-poll__visitors::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 207, 90, .5), rgba(87, 255, 207, .46), transparent);
}

.kb-poll__visitor-head {
    position: relative;
    display: grid;
    gap: 7px;
    min-width: 0;
    padding-right: clamp(0px, 18vw, 130px);
}

.kb-poll__visitor-head span,
.kb-poll__visitor-card span,
.kb-poll__visitor-ip span {
    display: block;
    color: var(--kb-poll-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kb-poll__visitor-head strong {
    color: var(--kb-poll-text);
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 930;
    line-height: 1.03;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.kb-poll__visitor-head p {
    max-width: 62ch;
    margin: 0;
    color: var(--kb-poll-soft-text);
    font-size: 13px;
    line-height: 1.6;
}

.kb-poll__visitor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.kb-poll__visitor-card,
.kb-poll__visitor-ip {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(168, 255, 232, .15);
    border-radius: var(--kb-poll-radius-md);
    background: rgba(2, 7, 16, .3);
    padding: clamp(14px, 2.4vw, 18px);
}

.kb-poll__visitor-card::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -30px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(87, 255, 207, .1);
}

.kb-poll__visitor-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 8px;
    color: var(--kb-poll-brand-2);
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 950;
    line-height: .95;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
    text-shadow: 0 0 28px rgba(87, 255, 207, .36);
}

.kb-poll__visitor-ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    grid-column: 1 / -1;
    border-color: rgba(87, 255, 207, .24);
    background:
        linear-gradient(135deg, rgba(87, 255, 207, .16), rgba(54, 125, 255, .1)),
        rgba(2, 7, 16, .38);
}

.kb-poll__visitor-ip::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--kb-poll-brand-2);
    box-shadow: 0 0 18px rgba(87, 255, 207, .9);
}

.kb-poll__visitor-ip > div,
.kb-poll__visitor-ip > span,
.kb-poll__visitor-ip > strong {
    min-width: 0;
}

.kb-poll__visitor-ip strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--kb-poll-text);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 900;
    line-height: 1.25;
    text-align: right;
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .kb-poll,
    .kb-poll__option,
    .kb-poll__notice,
    .kb-poll__empty,
    .kb-poll__visitors {
        background-color: #0a2135;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 780px) {
    .kb-poll {
        width: min(100%, 720px);
    }

    .kb-poll__visitor-grid {
        grid-template-columns: 1fr;
    }

    .kb-poll__visitor-head {
        padding-right: 0;
    }

    .kb-poll__visitor-ip {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .kb-poll-embed-page {
        display: block;
        min-height: 100svh;
        padding: 10px;
    }

    .kb-poll {
        min-height: calc(100svh - 20px);
        border-radius: 26px;
        padding: 18px;
    }

    .kb-poll h2 {
        font-size: clamp(32px, 13vw, 58px);
    }

    .kb-poll__option {
        border-radius: 22px;
    }

    .kb-poll__option::before {
        top: 12px;
        right: 14px;
        opacity: .75;
    }

    .kb-poll__choice {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 12px;
        padding-right: 28px;
    }

    .kb-poll__foot {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .kb-poll__foot button {
        width: 100%;
    }

    .kb-poll__foot span {
        max-width: none;
        text-align: left;
    }

    .kb-poll__visitor-ip {
        align-items: flex-start;
        flex-direction: column;
    }

    .kb-poll__visitor-ip::before {
        position: absolute;
        right: 16px;
        top: 16px;
    }

    .kb-poll__visitor-ip strong {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .kb-poll {
        border-radius: 22px;
        padding: 14px;
    }

    .kb-poll__eyebrow {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .kb-poll__notice,
    .kb-poll__empty {
        padding-left: 42px;
    }

    .kb-poll__result {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .kb-poll__result > span:last-child {
        width: max-content;
    }
}
