/* 投票样式 S */

.vote-container {
  padding: 2.6667vw 4vw 4vw;
}

.vote__title {
  margin-bottom: 3.2vw;
  color: #191919;
  font-size: 5.6vw;
  font-family: 'charter_bold';
  line-height: 8.2667vw;
}

.vote__deadline {
  margin-bottom: 3.2vw;
  color: #a4a4a4;
  font-size: 3.7333vw;
  line-height: 4.2667vw;
  text-align: right;
}

.vote__item {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 2.6667vw;
  overflow: hidden;
  border: 1px solid #dadada;
  background: #fbfbfb;
  color: #333;
  font-size: 4vw;
  font-weight: 500;
  line-height: 4.8vw;
  cursor: pointer;
}

.vote__item + .vote__item {
  margin-top: 3.2vw;
}

.vote__item.active {
  color: #4387e3;
  border: 1px solid #4387e3;
}

.vote-group[data-voteType='0'] .vote__item.active .vote__icon {
  background-color: #4387e3;
}

.vote-group[data-voteType='1'] .vote__item.active .vote__icon {
  background-color: #4387e3;
}

.vote__item.active .vote__percent-bg {
  background-color: #eef5fe;
}

.vote__icon--selected {
  display: none;
  width: 3.8667vw;
  height: 3.4667vw;
  margin-left: 2.6667vw;
  background: url('../imgs/icon-vote-selected.png') no-repeat 0 0;
  background-size: 3.8667vw 3.4667vw;
  vertical-align: 0;
}

.vote-group[data-voteType='0'] .vote__icon {
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  margin-right: 2.6667vw;
  border-radius: 50%;
  border: 1px solid #4387e3;
  background-color: #fff;
}

.vote-group[data-voteType='1'] .vote__icon {
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  margin-right: 2.6667vw;
  border: 1px solid #4387e3;
  background-color: #fff;
}

.vote__description {
  flex: 1;
  font-weight: bold;
  font-family: 'charter_bold';
  word-break: break-word;
}

.vote__percent-desc {
  display: none;
  margin-left: 2.6667vw;
  color: rgba(153, 153, 153, 0.9);
  white-space: nowrap;
  flex-basis: 16vw;
  text-align: right;
  font-weight: 500;
  font-family: HelveticaNeue-Medium, HelveticaNeue;
}

.vote__percent-bg {
  display: none;
  position: absolute;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(175, 177, 181, 0.1);
  z-index: -1;
  transition: all 0.5s ease-in-out;
}

.vote-group + .vote__action {
  margin-top: 4vw;
}

.vote__action {
  display: flex;
  justify-content: center;
  text-align: center;
}

.vote__btn {
  display: inline-block;
  width: 26.6667vw;
  height: 7.2vw;
  border-radius: 1.0667vw;
  font-size: 4vw;
  line-height: 7.2vw;
  cursor: pointer;
}

.vote__btn.disabled {
  background-color: #eee;
  color: #666;
}

/* 投票未开始 S */
.vote-container[data-status='0'] .vote__icon {
  border-color: #e6e6e6;
  background-color: #e6e6e6;
}

.vote-container[data-status='0'] .vote__btn {
  background-color: #eee;
  color: #b2b2b2;
}
/* 投票未开始 E */

/* 投票进行中(未投票) S */
.vote-container[data-status='1'][data-voted='false'] .vote__btn:not(.disabled) {
  background-color: #4387e3;
  color: #fff;
}
/* 投票进行中(未投票) E */

/* 投票进行中(已投票) S */
.vote-container[data-status='1'][data-voted='true'] .vote__icon {
  display: none;
}

.vote-container[data-status='1'][data-voted='true'] .vote__percent-desc,
.vote-container[data-status='1'][data-voted='true'] .vote__percent-bg {
  display: block;
}

.vote-container[data-status='1'][data-voted='true'] .vote__btn {
  background-color: #eee;
  color: #666;
  cursor: default;
}

.vote-container[data-status='1'][data-voted='true'] .vote__item[data-selected='true'] .vote__percent-bg {
  background-color: rgba(74, 148, 247, 0.1);
  color: #4387e3;
}

.vote-container[data-status='1'][data-voted='true'] .vote__item[data-selected='true'] .vote__icon--selected {
  display: inline-block;
}

.vote-container[data-status='1'][data-voted='true'] .vote__item[data-selected='true'],
.vote-container[data-status='1'][data-voted='true'] .vote__item[data-selected='true'] .vote__percent-desc {
  color: #4387e3;
}

.vote-container[data-status='1'] [data-first='true'] .vote__percent-bg {
  background-color: #eef5fe;
}

/* 投票进行中(已投票) E */

/* 投票结束 */
.vote-container[data-status='2'] .vote__icon {
  display: none;
}

.vote-container[data-status='2'] .vote__percent-desc,
.vote-container[data-status='2'] .vote__percent-bg {
  display: block;
}

.vote-container[data-status='2'] .vote__btn {
  display: none;
}

.vote-container[data-status='2'] .vote__item[data-selected='true'] .vote__icon--selected {
  display: inline-block;
}

.vote-container[data-status='2'] .vote__item[data-selected='true'] .vote__percent-bg {
  background-color: #eef5fe;
}

.vote-container[data-status='2'] .vote__item[data-selected='true'] .vote__description,
.vote-container[data-status='2'] .vote__item[data-selected='true'] .vote__percent-desc {
  color: #4387e3;
}

.vote-container[data-status='2'] .vote__item[data-first='true'] .vote__percent-bg {
  background-color: #edf4fe;
}

/* 黑暗模式 */
.is-dark .vote__item {
  border-color: transparent;
  background-color: rgba(255, 255, 255, 0.07);
}
.is-dark .vote-container[data-status='1'][data-voted='true'] .vote__item[data-selected='true'] {
  border: 1px solid #4387e3;
}
.is-dark .vote-group[data-voteType='0'] .vote__icon {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.07);
}

.is-dark .vote-group[data-voteType='1'] .vote__icon {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.07);
}

.is-dark .vote-group[data-voteType='0'] .vote__item.active .vote__icon {
  background-color: #fff;
}

.is-dark .vote-group[data-voteType='1'] .vote__item.active .vote__icon {
  background-color: #fff;
  border-color: #4387e3;
  border-width: 3px;
}
