/* ================================================
   IT用語辞典 読み方投票ウィジェット（常時表示版）
   ================================================ */

/* ウィジェット本体（常時表示） */
.itdict-poll-widget {
  margin-top: 20px;
  background: #fafbff;
  border: 1px solid #dde6ff;
  border-radius: 12px;
  padding: 16px 20px 20px;
  max-width: 480px;
}

/* 質問文 */
.itdict-poll-question {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px;
}

/* 投票オプション */
.itdict-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.itdict-poll-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid #c5d5ff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  background: #fff;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.itdict-poll-option:hover {
  background: #eef2ff;
  border-color: #1a73e8;
  transform: translateX(2px);
}
.itdict-poll-option:active {
  transform: translateX(0);
}

/* 結果表示モード */
.itdict-poll-widget.voted .itdict-poll-option {
  cursor: default;
  display: block;
  padding: 8px 14px;
  border-color: #e0e7ff;
}
.itdict-poll-widget.voted .itdict-poll-option:hover {
  background: #fff;
  border-color: #e0e7ff;
  transform: none;
}
.itdict-poll-option .option-label {
  font-size: 15px;
  font-weight: 600;
}

/* バーグラフ */
.itdict-poll-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.itdict-poll-bar-bg {
  flex: 1;
  height: 8px;
  background: #e0e7ff;
  border-radius: 4px;
  overflow: hidden;
}
.itdict-poll-bar-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.itdict-poll-bar-fill.winner {
  background: #1a73e8;
}
.itdict-poll-pct {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  min-width: 36px;
  text-align: right;
}
.itdict-poll-count {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* フッター */
.itdict-poll-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #999;
  text-align: right;
}

/* 投票済みバッジ */
.itdict-poll-voted-badge {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* winning option highlight */
.itdict-poll-option.winner .itdict-poll-bar-fill {
  background: #1a73e8;
}
.itdict-poll-option.winner .option-label {
  color: #1a73e8;
}
