
/* WBS VOTE DIALOG V3 — COMPACT LIQUID GLASS */

.vote-v3-overlay {
    position:fixed;
    inset:0;
    z-index:9000;
    display:grid;
    place-items:center;
    padding:12px;
    overflow:auto;
    background:rgba(4,8,17,.42);
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
}

.vote-v3-dialog {
    --ink:#e9eef8;
    --muted:#aebbcf;
    --accent:#baa8f1;
    --mint:#81e4b7;
    --gold:#e2c17c;
    --blue:#9bd2f3;
    --line:#9ab0d13b;
    --surface:#8ba1d00b;
    --field:#080f1b86;

    position:relative;
    width:min(560px,100%);
    max-height:calc(100vh - 24px);
    max-height:calc(100dvh - 24px);
    overflow:auto;
    overscroll-behavior:contain;
    padding:17px;
    border:1px solid #9fb8df65;
    border-radius:20px;
    color:var(--ink);
    background:#171e2c;
    background:
        radial-gradient(ellipse at 92% 0%,#9e83e51a,transparent 55%),
        linear-gradient(145deg,#202838d9,#101722e8);
    box-shadow:
        inset 0 1px 0 #ffffff30,
        inset 0 -1px 0 #a9c6ff12,
        0 20px 65px #0007;
    backdrop-filter:blur(22px) saturate(135%);
    -webkit-backdrop-filter:blur(22px) saturate(135%);
    font-family:inherit;
    line-height:1.45;
    scrollbar-width:thin;
    scrollbar-color:#8fa4c34f transparent;
}

/* Keep visible focus on controls, not the entire dialog. */

.vote-v3-dialog:focus {
    outline:none !important;
}

.vote-v3-dialog,.vote-v3-dialog * {
    box-sizing:border-box;
}

.vote-v3-dialog::-webkit-scrollbar {
    width:5px;
}

.vote-v3-dialog::-webkit-scrollbar-thumb {
    border-radius:8px;
    background:#8fa4c34f;
}

.vote-v3-dialog .vote-v3-neon-icon {
    width:20px;
    height:20px;
    flex:0 0 20px;
    vertical-align:middle;
}

.vote-v3-header,.vote-v3-heading {
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.vote-v3-header {
    justify-content:space-between;
    margin-bottom:12px;
}

.vote-v3-heading-icon {
    display:grid;
    place-items:center;
    flex:0 0 42px;
    width:42px;
    height:42px;
    border:1px solid #66dca64d;
    border-radius:11px;
    color:var(--mint);
    background:#61d6a313;
}

.vote-v3-heading-icon .vote-v3-neon-icon {
    width:28px;
    height:28px;
}

.vote-v3-kicker {
    font-size:10px;
    color:var(--accent);
}

.vote-v3-header h1 {
    margin:2px 0 0;
    font-size:21px;
    line-height:1.2;
    color:var(--ink);
    overflow-wrap:anywhere;
}

.vote-v3-close {
    display:grid;
    place-items:center;
    flex:0 0 40px;
    width:40px;
    height:40px;
    color:var(--muted);
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:11px;
    text-decoration:none;
}

.vote-v3-server {
    display:flex;
    align-items:center;
    gap:11px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--surface);
    box-shadow:inset 0 1px 0 #ffffff0c;
}

.vote-v3-server-icon {
    display:grid;
    place-items:center;
    flex:0 0 56px;
    width:56px;
    height:56px;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden;
    background:var(--field);
    color:var(--accent);
}

.vote-v3-server-icon img {
    width:100%;
    height:100%;
    display:block;
    object-fit:contain;
}

.vote-v3-server-icon svg {
    width:30px !important;
    height:30px !important;
}

.vote-v3-server-info {
    flex:1;
    min-width:0;
}

.vote-v3-server-info>strong {
    display:block;
    font-size:14px;
    color:var(--ink);
    overflow-wrap:anywhere;
}

.vote-v3-server-info p {
    margin:3px 0;
    font-size:10px;
    color:var(--muted);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.vote-v3-server-meta {
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin-top:5px;
}

.vote-v3-server-meta>span {
    border:1px solid var(--line);
    border-radius:6px;
    padding:2px 6px;
    font-size:10px;
    overflow-wrap:anywhere;
    max-width:100%;
}

.vote-v3-online {
    color:var(--mint);
    background:#54ce9712;
}

.vote-v3-offline {
    color:#f0a1ac;
    background:#ec759012;
}

.vote-v3-version {
    color:var(--blue);
    background:#73bde912;
}

.vote-v3-impact {
    margin-top:10px;
    padding:11px 12px;
    border:1px solid #5aca9950;
    border-radius:12px;
    background:#46b78b0b;
}

.vote-v3-impact h2 {
    display:flex;
    align-items:center;
    gap:7px;
    margin:0 0 8px;
    font-size:12px;
    color:var(--mint);
}

.vote-v3-impact h2 svg {
    width:19px;
    height:19px;
}

.vote-v3-impact-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.vote-v3-impact-item {
    display:grid;
    justify-items:center;
    gap:4px;
    min-width:0;
}

.vote-v3-impact-item+ .vote-v3-impact-item {
    border-left:1px solid #79bba333;
}

.vote-v3-impact-item>span {
    font-size:10px;
    color:var(--muted);
    text-align:center;
}

.vote-v3-values {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-width:0;
}

.vote-v3-values strong {
    font-size:22px;
    line-height:1.2;
    font-variant-numeric:tabular-nums;
}

.vote-v3-values svg,
.vote-v3-values .vote-v3-next {
    color:var(--mint);
}

.vote-v3-values svg {
    width:17px;
    height:17px;
    flex-basis:17px;
}

.vote-v3-impact p {
    margin:7px 0 0;
    font-size:10px;
    color:var(--muted);
    text-align:center;
}

.vote-v3-rewards {
    --reward:var(--blue);
    --reward-line:#79b5e44d;
    --reward-bg:#79b5e40b;

    display:flex;
    align-items:center;
    gap:10px;
    margin:10px 0;
    padding:10px;
    border:1px solid var(--reward-line);
    border-radius:12px;
    background:var(--reward-bg);
}

.vote-v3-rewards[data-reward-state="enabled"] {
    --reward:var(--mint);
    --reward-line:#57c79055;
    --reward-bg:#57c7900d;
}

.vote-v3-rewards[data-reward-state="disabled"] {
    --reward:var(--gold);
    --reward-line:#cda95455;
    --reward-bg:#cda95409;
}

.vote-v3-reward-icon {
    display:grid;
    place-items:center;
    flex:0 0 40px;
    width:40px;
    height:40px;
    color:var(--reward);
    border:1px solid var(--reward-line);
    border-radius:10px;
    background:var(--reward-bg);
}

.vote-v3-reward-icon .vote-v3-neon-icon {
    width:27px;
    height:27px;
}

.vote-v3-rewards>div:last-child {
    min-width:0;
    flex:1;
}

.vote-v3-rewards strong {
    color:var(--reward);
    font-size:12px;
}

.vote-v3-rewards p {
    margin:3px 0 0;
    color:var(--muted);
    font-size:11px;
    line-height:1.55;
}

.vote-v3-form {
    display:grid;
    gap:6px;
    margin-top:10px;
}

.vote-v3-form label {
    display:flex;
    align-items:center;
    gap:6px;
    color:var(--ink);
    font-size:12px;
    font-weight:600;
}

.vote-v3-form label svg {
    width:18px;
    height:18px;
    flex-basis:18px;
    color:var(--blue);
}

.vote-v3-form input {
    width:100%;
    min-height:43px;
    padding:9px 12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--field);
    color:var(--ink);
    font:inherit;
    font-size:16px;
}

.vote-v3-form input::placeholder {
    color:var(--muted);
}

.vote-v3-field-help,
.vote-v3-privacy-short {
    margin:0;
    color:var(--muted);
    font-size:10px;
    line-height:1.5;
}

.vote-v3-security {
    display:grid;
    gap:6px;
    min-width:0;
    padding:8px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
    overflow-x:auto;
}

.vote-v3-security-label {
    color:var(--ink);
    font-size:11px;
}

.vote-v3-security .cf-turnstile {
    width:100%;
}

.vote-v3-submit {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    width:100%;
    min-height:46px;
    padding:10px;
    border:1px solid #61cda47d;
    border-radius:11px;
    background:linear-gradient(120deg,#22594aab,#15352ebf);
    color:#b2f5d8;
    box-shadow:inset 0 1px 0 #a0ffe01e;
    font:inherit;
    font-weight:700;
    text-decoration:none;
    cursor:pointer;
}

.vote-v3-submit .vote-v3-neon-icon {
    width:23px;
    height:23px;
    flex-basis:23px;
}

.vote-v3-submit:disabled,
.vote-v3-submit[aria-disabled="true"] {
    opacity:.5;
    cursor:not-allowed;
}

.vote-v3-details {
    margin-top:10px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--surface);
}

.vote-v3-details summary {
    display:flex;
    align-items:center;
    gap:7px;
    min-height:40px;
    padding:8px 10px;
    color:var(--muted);
    font-size:10px;
    cursor:pointer;
    list-style:none;
}

.vote-v3-details summary::-webkit-details-marker {
    display:none;
}

.vote-v3-details summary>span {
    flex:1;
}

.vote-v3-details summary svg {
    width:16px;
    height:16px;
    flex-basis:16px;
    color:var(--blue);
}

.vote-v3-details[open] summary>svg:last-child {
    transform:rotate(180deg);
}

.vote-v3-details ul {
    margin:0;
    padding:2px 14px 12px 27px;
    color:var(--muted);
    font-size:11px;
    line-height:1.6;
}

.vote-v3-details li+li {
    margin-top:7px;
}

.vote-v3-cooldown {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    margin-top:8px;
    font-size:10px;
    color:var(--muted);
    text-align:center;
}

.vote-v3-cooldown svg {
    width:13px;
    height:13px;
    flex-basis:13px;
}

.vote-v3-message,.vote-v3-state {
    padding:11px;
    margin-top:8px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
    color:var(--ink);
    font-size:12px;
}

.vote-v3-state {
    display:grid;
    gap:8px;
}

.vote-v3-message--success {
    color:var(--mint);
    border-color:#52c79555;
    background:#52c79510;
}

.vote-v3-message--pending {
    color:var(--gold);
    border-color:#dab76b55;
    background:#dab76b10;
}

.vote-v3-message--error {
    color:#ffa5b6;
    border-color:#df789255;
    background:#df789210;
}

.vote-v3-dialog :focus-visible {
    outline:2px solid var(--blue);
    outline-offset:2px;
}

.vote-v3-close,
.vote-v3-submit,
.vote-v3-details summary {
    transition:background 180ms ease,border-color 180ms ease;
}

@media (hover:hover) and (pointer:fine) {
    .vote-v3-close:hover {
        border-color:var(--blue);
        background:#89aee61a;
    }

    .vote-v3-submit:not(:disabled):hover {
        border-color:var(--mint);
        background:linear-gradient(120deg,#2c735d,#194439);
    }

    .vote-v3-details summary:hover {
        color:var(--ink);
    }
}

/* LIGHT THEME */

html[data-theme="light"] .vote-v3-overlay {
    background:#536a902b;
}

html[data-theme="light"] .vote-v3-dialog {
    --ink:#23344e;
    --muted:#53657c;
    --accent:#6949ae;
    --mint:#166c49;
    --gold:#87601f;
    --blue:#246b96;
    --line:#7792b54a;
    --surface:#6986bb0b;
    --field:#ffffffd9;

    background:
        radial-gradient(ellipse at 95% 0%,#cbb5f333,transparent 55%),
        linear-gradient(145deg,#f8fbffed,#edf2fce8);
    border-color:#9fb2ce;
    box-shadow:inset 0 1px 0 #fff,0 20px 65px #35476a38;
}

html[data-theme="light"] .vote-v3-submit {
    background:linear-gradient(120deg,#daf6e9,#c5ecdc);
    color:#175c40;
    border-color:#4eaa805e;
}

html[data-theme="light"] .vote-v3-submit:not(:disabled):hover {
    background:#c1ebd8;
}

html[data-theme="light"] .vote-v3-offline,
html[data-theme="light"] .vote-v3-message--error {
    color:#a02c49;
}

@media (max-width:560px) {
    .vote-v3-overlay {
        padding:8px;
    }

    .vote-v3-dialog {
        padding:12px;
        border-radius:16px;
        max-height:calc(100dvh - 16px);
    }

    .vote-v3-header h1 {
        font-size:17px;
    }

    .vote-v3-close {
        width:44px;
        height:44px;
        flex-basis:44px;
    }

    .vote-v3-details summary {
        min-height:44px;
    }

    .vote-v3-values strong {
        font-size:20px;
    }
}

@media (max-width:360px) {
    .vote-v3-overlay {
        padding:4px;
    }

    .vote-v3-dialog {
        padding:7px;
        max-height:calc(100dvh - 8px);
    }

    .vote-v3-heading-icon {
        display:none;
    }

    .vote-v3-security {
        padding:3px;
    }
}

@media (max-height:800px) and (min-width:561px) {
    .vote-v3-dialog {
        padding:13px;
    }

    .vote-v3-header {
        margin-bottom:9px;
    }

    .vote-v3-impact {
        padding:9px;
        margin-top:8px;
    }

    .vote-v3-rewards {
        padding:8px;
        margin:8px 0;
    }
}

@media (prefers-reduced-motion:reduce) {
    .vote-v3-dialog * {
        transition:none !important;
        animation:none !important;
    }
}
