/* 6.-1.3 投票组件（版本一：卡片式单选） */

.vote-widget {
  margin: 26px 0 30px;
  padding: 20px 22px 18px;
  border-radius: 12px;
  background: var(--color-wrap, #fff);
  box-shadow: 0 0 10px 2px var(--color-hover-shadow, rgba(120, 120, 120, 0.15));
  border: 1px solid var(--color-h2-border, #e8e8e8);
}

.vote-widget .vote-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--red-5, #eee9ff);
  color: var(--red-1, #5b4a9a);
  margin-bottom: 10px;
}

.vote-widget .vote-q {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--color-default, #444);
}

.vote-widget .vote-anon {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--red-1, #5b4a9a);
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--red-5, #eee9ff);
  border-left: 3px solid var(--red-1, #5b4a9a);
}

.vote-widget .vote-anon b {
  font-weight: 700;
}

.vote-widget .vote-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--color-h2-border, #e8e8e8);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  background: transparent;
}

.vote-widget .vote-opt:hover {
  border-color: var(--red-2, #7d6bc1);
}

.vote-widget .vote-opt.on {
  border-color: var(--red-1, #5b4a9a);
  background: var(--red-5, #eee9ff);
}

.vote-widget .vote-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--grey-9, #888);
  flex: 0 0 auto;
  margin-top: 4px;
  position: relative;
}

.vote-widget .vote-opt.on .vote-dot {
  border-color: var(--red-1, #5b4a9a);
}

.vote-widget .vote-opt.on .vote-dot:after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--red-1, #5b4a9a);
}

.vote-widget .vote-txt {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-default, #444);
}

.vote-widget .vote-sub {
  display: block;
  color: var(--grey-9, #888);
  font-size: 12.5px;
  margin-top: 2px;
}

.vote-widget .vote-input {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 8px 11px;
  border: 1.5px solid var(--color-h2-border, #e8e8e8);
  border-radius: 8px;
  background: transparent;
  color: var(--color-default, #444);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.vote-widget .vote-input:focus {
  border-color: var(--red-1, #5b4a9a);
}

.vote-widget .vote-submit {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: var(--red-1, #5b4a9a);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.18s;
  font-family: inherit;
}

.vote-widget .vote-submit:hover:not(:disabled) {
  background: var(--red-2, #7d6bc1);
}

.vote-widget .vote-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vote-widget .vote-result {
  margin-top: 4px;
}

.vote-widget .vote-row {
  margin-bottom: 12px;
}

.vote-widget .vote-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  margin-bottom: 5px;
}

.vote-widget .vote-row-name {
  flex: 1;
  color: var(--color-default, #444);
}

.vote-widget .vote-row-pct {
  color: var(--red-1, #5b4a9a);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vote-widget .vote-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--color-h2-border, #e8e8e8);
  overflow: hidden;
}

.vote-widget .vote-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--red-1, #5b4a9a);
  transition: width 0.5s ease;
}

.vote-widget .vote-custom-echo {
  font-size: 13px;
  color: var(--color-default, #444);
  background: var(--red-5, #eee9ff);
  border-radius: 8px;
  padding: 8px 11px;
  margin: 0 0 12px;
  word-break: break-word;
}

.vote-widget .vote-total {
  color: var(--grey-9, #888);
  font-size: 12.5px;
  margin-top: 2px;
}

.vote-widget .vote-msg {
  font-size: 13px;
  color: var(--grey-9, #888);
  margin-top: 10px;
}

.vote-widget .vote-msg.err {
  color: #d73a49;
}

[data-theme="dark"] .vote-widget {
  background: var(--color-wrap, #272b30);
  border-color: var(--color-h2-border, #47474a);
}
