/* Poll controls are fully styled and scoped; no browser-native control chrome. */
.ovo-poll-overlay, .ovo-poll-message, .ovo-poll-settings {
    --poll-accent: var(--primary-color, #cee4f1);
    --poll-ink: #303239;
    --poll-muted: #85868f;
    --poll-paper: #fff;
    --poll-soft: #f6f7f9;
    --poll-line: #eceef1;
    --poll-tint: color-mix(in srgb, var(--poll-accent) 22%, var(--poll-paper));
    --poll-mark: var(--poll-theme-mark, color-mix(in srgb, var(--poll-accent) 48%, #303239));
    color: var(--poll-ink);
    font-family: var(--font-family, sans-serif);
    font-size: 14px;
    line-height: 1.5;
}
body.night-mode-active :is(.ovo-poll-overlay, .ovo-poll-message, .ovo-poll-settings) {
    --poll-ink: #e9e9ed; --poll-muted: #a0a1ac; --poll-paper: #202126; --poll-soft: #2a2b32; --poll-line: #373941;
    --poll-mark: color-mix(in srgb, var(--poll-accent) 70%, #eee);
}
:is(.ovo-poll-overlay, .ovo-poll-message) *, .ovo-poll-settings * { box-sizing: border-box; }
:is(.ovo-poll-overlay, .ovo-poll-message) button, #poll-expansion-btn {
    -webkit-appearance: none; appearance: none; border: 0; margin: 0; padding: 0; background: transparent;
    color: inherit; font: inherit; letter-spacing: inherit; line-height: 1.5; text-align: center; text-transform: none;
    box-shadow: none; min-height: 0; min-width: 0; border-radius: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
:is(.ovo-poll-overlay, .ovo-poll-message) button:disabled { opacity: .48; cursor: default; }
:is(.ovo-poll-overlay, .ovo-poll-message) button:focus-visible, .ovo-poll-overlay input:focus-visible, #poll-expansion-btn:focus-visible {
    outline: 2px solid var(--poll-mark, #6b7b8b); outline-offset: 3px;
}
:is(.ovo-poll-overlay, .ovo-poll-message) svg { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.ovo-poll-overlay h2, .ovo-poll-overlay h3, .ovo-poll-overlay p, .ovo-poll-message h3, .ovo-poll-message p { margin: 0; padding: 0; color: inherit; text-align: left; }
.ovo-poll-overlay [hidden], .ovo-poll-settings [hidden], #poll-expansion-btn[hidden] { display: none !important; }
.ovo-poll-overlay {
    position: absolute; inset: 0; z-index: 10005; display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 16px; background: rgb(22 25 34 / 28%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    overflow: hidden; animation: ovoPollFade .18s ease-out;
}
.ovo-poll-sheet {
    width: 100%; max-width: 520px; max-height: 100%; display: flex; flex-direction: column; min-height: 0;
    background: var(--poll-paper); border-radius: 26px; padding: 14px 0 0; color: var(--poll-ink); overflow: hidden;
    box-shadow: 0 12px 40px rgb(20 25 35 / 12%); animation: ovoPollRise .22s ease-out;
}
.ovo-poll-handle { display: none; }
.ovo-poll-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 20px 3px; flex-shrink: 0; }
.ovo-poll-sheet-header h2 { font-size: 18px; font-weight: 600; letter-spacing: .4px; }
.ovo-poll-overlay .ovo-poll-icon-button { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--poll-muted); flex-shrink: 0; }
.ovo-poll-overlay .ovo-poll-icon-button:hover { background: var(--poll-soft); }
.ovo-poll-sheet-body { min-height: 0; padding: 2px 20px 7px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--poll-line) transparent; }
.ovo-poll-sheet-body .ovo-poll-sheet-subtitle { font-size: 12px; color: var(--poll-muted); margin: 0 0 20px; }
.ovo-poll-sheet-footer { padding: 10px 20px max(18px, env(safe-area-inset-bottom, 0px)); flex-shrink: 0; background: var(--poll-paper); }
.ovo-poll-mode-list { display: flex; gap: 8px; margin-bottom: 23px; }
.ovo-poll-overlay .ovo-poll-mode { flex: 1; padding: 12px 5px; border: 1px solid var(--poll-line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; }
.ovo-poll-overlay .ovo-poll-mode[aria-pressed="true"] { border-color: var(--poll-accent); background: var(--poll-tint); color: var(--poll-mark); }
.ovo-poll-field-label { display: block; color: var(--poll-muted); font-size: 12px; margin: 0 0 9px; font-weight: 400; }
.ovo-poll-overlay input[type="text"] {
    -webkit-appearance: none; appearance: none; display: block; margin: 0; border: 0; box-shadow: none; font: inherit;
    background: transparent; color: var(--poll-ink); line-height: 1.5; outline-offset: 2px; min-width: 0; height: auto;
    -webkit-text-fill-color: var(--poll-ink); text-align: left; caret-color: var(--poll-mark);
}
.ovo-poll-overlay input[type="text"]::placeholder { color: var(--poll-muted); -webkit-text-fill-color: var(--poll-muted); opacity: .85; }
.ovo-poll-overlay input.ovo-poll-question { width: 100%; padding: 13px 12px; background: var(--poll-soft); border-radius: 12px; margin-bottom: 20px; }
.ovo-poll-options-heading { display: flex; align-items: center; justify-content: space-between; color: var(--poll-muted); font-size: 11px; margin-bottom: 9px; }
.ovo-poll-options-heading .ovo-poll-field-label { margin: 0; }
.ovo-poll-option-list { display: flex; flex-direction: column; gap: 8px; }
.ovo-poll-option-editor { display: flex; align-items: center; gap: 10px; padding: 3px 6px 3px 13px; border: 1px solid var(--poll-line); border-radius: 12px; }
.ovo-poll-option-editor > span { font-size: 12px; color: var(--poll-muted); }
.ovo-poll-option-editor input[type="text"] { flex: 1; width: 100%; padding: 7px 0; }
.ovo-poll-option-editor:focus-within { border-color: var(--poll-accent); box-shadow: 0 0 0 3px var(--poll-tint); }
.ovo-poll-option-editor input[type="text"]:focus-visible { outline: none; }
.ovo-poll-overlay .ovo-poll-add { display: inline-flex; align-items: center; gap: 6px; padding: 13px 0 16px; color: var(--poll-mark); font-size: 12px; }
.ovo-poll-add svg { width: 15px; height: 15px; }
.ovo-poll-overlay .ovo-poll-more { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; border-top: 1px solid var(--poll-line); font-size: 12px; }
.ovo-poll-more > span:last-child { display: inline-flex; align-items: center; gap: 7px; color: var(--poll-muted); }
.ovo-poll-more svg { width: 14px; height: 14px; transition: transform .18s; }
.ovo-poll-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.ovo-poll-overlay .ovo-poll-primary, .ovo-poll-message .ovo-poll-primary {
    display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px 12px; border-radius: 14px;
    background: var(--poll-accent); color: var(--poll-action-ink, #242d36); font-weight: 600; font-size: 14px; transition: filter .15s, transform .15s;
}
.ovo-poll-primary:hover { filter: brightness(.97); }
.ovo-poll-primary:active { transform: scale(.985); }
.ovo-poll-advanced { border-top: 1px solid var(--poll-line); padding: 0 0 5px; }
.ovo-poll-config-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--poll-line); font-size: 13px; }
.ovo-poll-config-row:last-child { border: 0; }
.ovo-poll-config-row.is-stacked { flex-direction: column; align-items: flex-start; gap: 10px; }
.ovo-poll-switch { position: relative; display: inline-flex; width: 40px; height: 24px; flex-shrink: 0; margin: 0; }
.ovo-poll-switch input { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ovo-poll-switch > span { width: 100%; height: 100%; border-radius: 24px; background: var(--poll-line); transition: background .18s; }
.ovo-poll-switch > span:after { content: ''; width: 18px; height: 18px; display: block; margin: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgb(0 0 0 / 10%); transition: transform .18s; }
.ovo-poll-switch input:checked + span { background: var(--poll-accent); }
.ovo-poll-switch input:checked + span:after { transform: translateX(16px); }
.ovo-poll-switch input:focus-visible + span { outline: 2px solid var(--poll-mark); outline-offset: 3px; }
.ovo-poll-segments { display: flex; gap: 4px; padding: 3px; background: var(--poll-soft); border-radius: 10px; }
.ovo-poll-overlay .ovo-poll-segment { font-size: 11px; padding: 6px 9px; border-radius: 7px; white-space: nowrap; }
.ovo-poll-overlay .ovo-poll-segment[aria-pressed="true"] { background: var(--poll-paper); color: var(--poll-mark); box-shadow: 0 1px 4px rgb(0 0 0 / 6%); }
.ovo-poll-participants { display: flex; flex-wrap: wrap; gap: 7px; width: 100%; }
.ovo-poll-overlay .ovo-poll-person { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--poll-line); border-radius: 20px; padding: 6px 10px 6px 6px; font-size: 12px; overflow-wrap: anywhere; }
.ovo-poll-overlay .ovo-poll-person[aria-pressed="true"] { background: var(--poll-tint); border-color: var(--poll-accent); }
.ovo-poll-avatar { display: inline-flex; width: 29px; height: 29px; align-items: center; justify-content: center; border-radius: 10px; background: var(--poll-soft); color: var(--poll-muted); font-size: 12px; overflow: hidden; flex-shrink: 0; }
.ovo-poll-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ovo-poll-person .ovo-poll-avatar { width: 23px; height: 23px; border-radius: 50%; }
.ovo-poll-sealed-hint { display: flex; align-items: center; gap: 7px; color: var(--poll-muted); font-size: 12px; margin-bottom: 13px; }
.ovo-poll-sealed-hint svg { width: 14px; height: 14px; }
.ovo-poll-sheet-body .ovo-poll-error { font-size: 12px; color: #bc4e65; padding: 2px 0; }
.ovo-poll-message { width: 100%; }
.ovo-poll-card { width: min(320px, calc(100% - 52px)); margin: 0 8px; padding: 17px; border: 1px solid var(--poll-line); border-radius: 19px; background: var(--poll-paper); box-shadow: 0 2px 7px rgb(20 25 35 / 2%); min-width: 0; }
.ovo-poll-message .group-msg-content { width: 336px; min-width: 0; }
.ovo-poll-message .group-msg-content .ovo-poll-card { width: calc(100% - 16px); }
.ovo-poll-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.ovo-poll-kind { display: inline-flex; align-items: center; gap: 6px; color: var(--poll-muted); font-size: 11px; }
.ovo-poll-kind svg { width: 14px; height: 14px; }
.ovo-poll-status { font-size: 11px; color: var(--poll-mark); }
.ovo-poll-message h3 { font-weight: 600; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; margin-bottom: 6px; }
.ovo-poll-message .ovo-poll-meta, .ovo-poll-overlay .ovo-poll-meta { color: var(--poll-muted); font-size: 11px; }
.ovo-poll-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ovo-poll-message .ovo-poll-choice { display: flex; justify-content: space-between; align-items: center; position: relative; isolation: isolate; width: 100%; padding: 12px 11px; border-radius: 12px; overflow: hidden; background: var(--poll-soft); text-align: left; gap: 8px; font-size: 13px; }
.ovo-poll-message .ovo-poll-choice:disabled { opacity: 1; }
.ovo-poll-choice:before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--poll-fill, 0%); background: var(--poll-tint); z-index: -1; transition: width .2s; }
.ovo-poll-choice[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--poll-accent); }
.ovo-poll-choice-main { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; }
.ovo-poll-choice-mark { width: 17px; height: 17px; border: 1px solid var(--poll-muted); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ovo-poll-choice-mark.is-multiple { border-radius: 5px; }
.ovo-poll-choice-mark svg { width: 12px; height: 12px; }
.ovo-poll-choice[aria-pressed="true"] .ovo-poll-choice-mark { background: var(--poll-accent); border-color: transparent; color: #303239; }
#poll-expansion-btn .expansion-item-icon svg { fill: none; }
.ovo-poll-count { font-size: 11px; white-space: nowrap; color: var(--poll-muted); }
.ovo-poll-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding-top: 13px; margin-top: 16px; border-top: 1px solid var(--poll-line); font-size: 11px; color: var(--poll-muted); }
.ovo-poll-card-bottom > span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ovo-poll-progress { line-height: 1.45; }
.ovo-poll-status.is-ready { color: var(--poll-mark); font-weight: 650; }
.ovo-poll-voter-avatars { display: inline-flex; }
.ovo-poll-voter-avatars .ovo-poll-avatar { width: 20px; height: 20px; border-radius: 50%; font-size: 10px; margin-right: 2px; }
.ovo-poll-message .ovo-poll-text-button { color: var(--poll-mark); font-size: 12px; white-space: nowrap; padding: 3px 0; }
.ovo-poll-text-button svg { width: 13px; height: 13px; }
.ovo-poll-manage { text-align: right; margin-top: 8px; }
.ovo-poll-feedback { font-size: 11px; color: var(--poll-muted); margin-top: 8px; }
.ovo-poll-notice { justify-content: center; margin: 10px 0; }
.ovo-poll-notice .ovo-poll-notice-text { max-width: 92%; padding: 5px 11px; border-radius: 11px; background: rgb(125 130 140 / 7%); color: #85868f; font-size: 11px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; }
body.night-mode-active .ovo-poll-notice .ovo-poll-notice-text { color: #a0a1ac; background: rgb(220 225 235 / 6%); }
.ovo-poll-notice .ovo-poll-notice-text.is-sealed {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: #545963;
}
.ovo-poll-notice-headline { font-weight: 600; }
.ovo-poll-notice-progress {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 8px;
    background: #e9eef6;
    color: #405679;
    font-size: 11px;
    line-height: 1.45;
}
.ovo-poll-notice-progress svg { flex: 0 0 13px; width: 13px; height: 13px; }
body.night-mode-active .ovo-poll-notice .ovo-poll-notice-text.is-sealed { color: #d7dbe5; }
body.night-mode-active .ovo-poll-notice-progress { background: #323d52; color: #ccddfa; }
.ovo-poll-message .ovo-poll-submit { margin-top: 12px; padding: 10px; font-size: 12px; border-radius: 11px; }
.ovo-poll-match-result { padding: 12px; margin-top: 12px; border-radius: 11px; background: var(--poll-soft); font-size: 12px; }
.ovo-poll-detail-question { font-size: 16px; font-weight: 600; padding: 8px 0!important; overflow-wrap: anywhere; }
.ovo-poll-detail-note { color: var(--poll-muted)!important; font-size: 12px; padding: 15px 0!important; }
.ovo-poll-detail-counts { padding: 12px 0; }
.ovo-poll-detail-counts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--poll-line); overflow-wrap: anywhere; }
.ovo-poll-detail-counts > div > span:last-child { white-space: nowrap; color: var(--poll-muted); }
.ovo-poll-detail-people { margin: 10px 0 15px; }
.ovo-poll-detail-people > div { display: flex; align-items: center; gap: 9px; padding: 10px 0; }
.ovo-poll-detail-people > div > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ovo-poll-detail-people > div > span:last-child { color: var(--poll-muted); max-width: 52%; font-size: 12px; overflow-wrap: anywhere; }
.ovo-poll-settings .kkt-item { gap: 12px; }
.ovo-poll-settings .kkt-item-label { flex: 1; min-width: 0; }
.ovo-poll-settings .kkt-item-hint { color: var(--poll-muted); font-size: 11px; margin: 4px 0 0; line-height: 1.6; }
.ovo-poll-settings .kkt-item-control { flex-shrink: 0; }
.ovo-poll-settings .kkt-switch input { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; z-index: 1; cursor: pointer; }
.ovo-poll-settings input:checked + .kkt-slider { background: var(--poll-accent); }
.ovo-poll-settings input:focus-visible + .kkt-slider { outline: 2px solid var(--poll-mark); outline-offset: 3px; }
@keyframes ovoPollRise { from { transform: translateY(22px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@keyframes ovoPollFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 340px) { .ovo-poll-sheet-body, .ovo-poll-sheet-header { padding-left: 15px; padding-right: 15px; } .ovo-poll-sheet-footer { padding-left: 15px; padding-right: 15px; } .ovo-poll-config-row { gap: 8px; } .ovo-poll-overlay .ovo-poll-segment { padding-inline: 6px; } .ovo-poll-card { padding: 14px; } }
@media (pointer: coarse) { .ovo-poll-overlay input[type="text"] { font-size: 16px; } .ovo-poll-overlay .ovo-poll-icon-button { height: 40px; } .ovo-poll-card-bottom .ovo-poll-text-button { min-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .ovo-poll-overlay, .ovo-poll-sheet { animation: none; } .ovo-poll-overlay *, .ovo-poll-message * { transition: none!important; } }
