/* 投票界面重做：聊天里的投票卡片 + 发起投票弹窗。逻辑不变，颜色全部跟随主题。
   卡片外层（背景 / 阴影 / 圆角）只用单个 class（.vote-poll）、不加 ::before / ::after，
   别人做的卡片美化（例如果冻质感）写在 .vote-card 上时仍然生效；内部沿用原来的 class 名，只改外观。 */

/* ---------- 卡片 ---------- */
.vote-poll {
    width: 168px; padding: 10px 10px 8px; border: 0; border-radius: 15px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--primary-color, #cee4f1) 34%, #fff) 0%, #fff 64%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
}
.vote-poll .vote-card-head { align-items: center; gap: 7px; margin-bottom: 8px; }
.vote-poll .vote-card-icon {
    width: 24px; height: 24px; flex: 0 0 24px; margin-top: 0; padding: 5px; box-sizing: border-box; border-radius: 50%;
    background: var(--primary-color, #cee4f1); fill: var(--text-color, #2a3032);
}
.vote-poll .vote-card-title { font-size: calc(12.5px * var(--app-font-scale, 1)); color: var(--text-color, #2a3032); }
.vote-poll .vote-card-sub { margin-top: 3px; }
.vote-poll .vote-options { gap: 5px; }
.vote-poll .vote-option-text { font-size: calc(12px * var(--app-font-scale, 1)); }
.vote-poll .vote-card-sub { font-size: calc(9.5px * var(--app-font-scale, 1)); }
.vote-poll .vote-option {
    position: relative; overflow: hidden; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .045);
    transition: box-shadow .2s, background-color .2s;
}
/* 票数占比：选项背景像进度条一样铺开 */
.vote-poll .vote-option::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); pointer-events: none;
    background: color-mix(in srgb, var(--primary-color, #cee4f1) 70%, transparent); transition: width .4s ease;
}
.vote-poll .vote-option > * { position: relative; z-index: 1; }
.vote-poll .vote-option.selected { background: rgba(0, 0, 0, .045); box-shadow: inset 0 0 0 1.5px var(--text-color, #2a3032); }
.vote-poll .vote-check { width: 14px; height: 14px; flex: 0 0 14px; box-sizing: border-box; border: 1.5px solid #b9c0c2; background: #fff; border-radius: 50%; position: relative; }
.vote-poll .vote-option.selected .vote-check { border-color: var(--text-color, #2a3032); background: #fff; }
/* 选中：圆环里一个居中的实心圆点（不用勾，避免歪） */
.vote-poll .vote-option.selected .vote-check::after {
    content: ''; position: absolute; inset: 2px; left: 2px; top: 2px; width: auto; height: auto; border: 0; transform: none;
    border-radius: 50%; background: var(--text-color, #2a3032);
}
.vote-poll .vote-voter-chip { background: rgba(255, 255, 255, .85); color: #5b6568; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.vote-poll .vote-add-btn { border: 1.5px dashed #c3c9cb; border-radius: 10px; color: #7d878a; padding: 5px; font-size: calc(11px * var(--app-font-scale, 1)); }
.vote-poll .vote-add-input { border: 0; background: #f1f3f4; border-radius: 10px; padding: 5px 9px; font-size: 12px; }
.vote-poll .vote-add-confirm { border-radius: 10px; background: var(--text-color, #2a3032); color: #fff; padding: 5px 9px; font-size: 12px; }

/* ---------- 发起投票弹窗（居中） ---------- */
#vote-compose-modal { align-items: center; justify-content: center; background: rgba(20, 24, 26, .42); }
#vote-compose-modal .modal-window {
    width: 84%; max-width: 330px; max-height: 76%; overflow-y: auto; box-sizing: border-box; padding: 16px 16px 14px;
    border-radius: 22px; background: #fbfbfc; box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
    animation: voteComposePop .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes voteComposePop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
#vote-compose-modal .modal-window h3 { margin: 0 0 13px; text-align: left; font-size: 17px; font-weight: 700; color: var(--text-color, #2a3032); }
#vote-compose-modal .form-group { margin-bottom: 13px; }
#vote-compose-modal .form-group > label { display: block; font-size: 10px; letter-spacing: .06em; color: #8a9496; margin-bottom: 6px; line-height: 1.5; }
#vote-compose-modal #vote-compose-title {
    width: 100%; height: 36px; box-sizing: border-box; padding: 0 11px; border: 0; border-radius: 11px; background: #f1f3f4;
    font-size: 13px; font-family: var(--font-family); color: #2f383b;
}
#vote-compose-modal #vote-compose-title:focus, .vote-compose-option:focus { outline: 2px solid color-mix(in srgb, var(--primary-color, #cee4f1) 90%, #000 10%); background: #fff; }
.vote-compose-row { display: flex; align-items: center; gap: 8px; }
.vote-compose-no {
    flex: none; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--primary-color, #cee4f1) 60%, #fff);
    color: var(--text-color, #2a3032); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
#vote-compose-modal .vote-compose-option {
    flex: 1; min-width: 0; width: auto; height: 36px; padding: 0 11px; border: 0; border-radius: 11px; background: #f1f3f4; font-size: 13px;
}
.vote-compose-del { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: #b5bcbf; font-size: 19px; line-height: 1; cursor: pointer; padding: 0; }
#vote-compose-modal #vote-compose-add {
    width: 100%; margin: 8px 0 0 !important; height: 34px; border: 0; border-radius: 11px; background: #f1f3f4; color: #5b6568; font-size: 12px; box-shadow: none;
}
#vote-compose-modal form > .btn-primary {
    width: 100%; height: 36px; border: 0; border-radius: 18px; background: var(--text-color, #2a3032); color: #fff;
    font-size: 13px; letter-spacing: .06em; box-shadow: 0 5px 12px rgba(0, 0, 0, .14);
}
