.Voting {
  white-space: nowrap !important;
  span {
    white-space: nowrap !important;
  }
}

.Voting__button {
  .Icon {
    // Put the icon in a layer to improve rendering performance (scrolling especially)
    transform: translate3d(0,0,0);
  }
  path {
    fill: $dark-gray;
  }
  circle {
    stroke: $dark-gray;
  }
  > a:hover path {
    fill: $black;
  }
}

.Voting__about-flag {
    margin-right: 30px;
}

.Voting__button-up {
  .Icon {
    margin-left: 0;
    border-radius: 50%;
  }
  > a {
    padding-right: 0.5rem;
  }
  path {
    fill: #4BA2F2;
  }
  circle {
    stroke: #4BA2F2;
  }
  // exclude small devices
  @media screen and (min-width: 39.9375em) {
      .Icon:hover {
          box-shadow: 0 0 0 rgba(75, 162, 242, 1);
          animation: pulse 2s infinite;
      }
  }
}

.Voting__button-up > a:hover, a.confirm_weight:hover {
    path {
        fill: #fff;
    }
    circle {
        fill: #4BA2F2;
        stroke: #4BA2F2;
    }
    svg {
        background-size: contain;
        border-radius: 50%;
    }
}

.Voting__button-up.votingUp {
  padding-right: 0.5rem;
  svg {
    border: 1px solid #4BA2F2;
    border-radius: 50%;
    border-right-color: transparent;
    border-top-color: transparent;
    animation: loading 500ms infinite linear;
  }
}

.Voting__button-down.votingDown svg {
  border: 1px solid #a00;
  border-radius: 50%;
  border-right-color: transparent;
  border-top-color: transparent;
  animation: loading 500ms infinite linear;
}

.Voting__button-down {
  margin-left: 0.25rem;
  .Voting__button-downvotes {
    color: #aaa;
    font-size: 80%;
    vertical-align: 15%;
    padding-right: 0.1rem;
  }

  a:hover path {
    fill: #a00;
  }
}

.Voting__button--upvoted {
  .Icon:hover {
    animation: none !important;
  }
  path {
    fill: #fff !important;
  }
}

.Voting__button--upvoted circle {
  fill: #4BA2F2;
  stroke: #4BA2F2;
}

.Voting__button--upvoted a:hover path {
  fill: #fff !important;
}

.Voting__button--upvoted a:hover circle {
  fill: #258DEB;
  stroke: #258DEB;
}

.Voting__button--downvoted path {
  fill: #a00;
}

.Voting .DropdownMenu ul {
  width: 240px;

  li > a {
    padding: 0 0.5rem;
    line-height: 1.25;
  }

  li > span {
    padding: 0 0.5rem;
    line-height: 1.25;
  }
}

.DropdownMenu.Voting__voters_list ul {
  li > a {
    //font-weight: 200;
  }

  li > span {
    padding: 0.25rem 0.5rem;
    font-size: 82.5%;
    display: block;
    color: #666;
  }
}

.Voting__inner {
  border-right: 1px solid #cacaca;
  padding-right: .8rem;
  margin-right: .6rem;
  .DropdownMenu .Icon.dropdown-arrow {
    margin-right: -0.5rem
  }
  .cancel {
    font-size: 80%;
    padding: 0 0.4em;
    margin-left: 0.5rem;
    margin-right: 2px;
    background-color: #f8f8f8;
    border-radius: 50%;
    border: 1px solid #dadada;
    color: #8a8a8a;
  }
}

.Voting__adjust_weight_down {
    @extend .Voting__adjust_weight;

    right: 0;
    width: auto !important;
    max-width: 500px;

    div.clear {
      clear: both;
    }
    p, span {
      white-space: normal !important;
    }
    .weight-display {
      color: #C00 !important;
    }
    .rangeslider {
      margin-right: 2rem;
    }
}

.Voting__adjust_weight {
  padding: 10px 20px;
  margin-right: 10px;
  width: 350px;
  overflow: hidden;
  .Icon:hover {
    animation: none !important;
  }
  .weight-display {
    width: 3rem;
    float: left;
    margin-right: 0.5rem;
    text-align: right;
    color: $dark-gray;
    line-height: 2.6rem;
  }
  a.confirm_weight {
    float: left;
    width: 2rem;
    height: 2rem;
    line-height: 2.6rem;
  }
  .rangeslider {
    position: relative;
    float: left;
    background: #e6e6e6;
    .rangeslider__fill, .rangeslider__handle {
      position: absolute;
    }
    &, .rangeslider__fill {
      display: block;
      box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3);
      border-radius: 10px;
    }
    .rangeslider__handle {
      background: #fff;
      border: 1px solid #ccc;
      cursor: pointer;
      display: inline-block;
      position: absolute;
      &:active {
        background: #4ba2f2;
      }
    }
  }
  .rangeslider-horizontal {
    height: 10px;
    width: 200px;
    background: none;
    float: left;
    margin-top: 18px;
    .rangeslider__fill {
      height: 100%;
      background: #4ba2f2;
      box-shadow: none;
      left: 0;
    }
    .rangeslider__handle {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      top: -10px;
      &:active {
        box-shadow: none;
      }
    }
  }
  .Voting__adjust_weight_close {
    position: static;
    line-height: 2.6rem;
    font-size: 2rem;
    margin-left: 1rem;
  }
}


@media screen and (max-width: 39.9375em) {
  .Voting__button-up {
    .dropdown-pane {
      margin-top: -36px;
      position: absolute;
      left: 1rem;
    }
  }
}

/* Medium and bigger */
@media screen and (min-width: 39.9375em) {
  .Voting__button-up {
    display: inline-block;
    position: relative;
    .dropdown-pane {
      top: -18px;
      left: -28px;
    }
  }
}

/* Pulse for upvote action */
@-webkit-keyframes pulse {
    0% {
        -webkit-box-shadow: 0 0 0 0 rgba(75, 162, 242, 2);
    }
    70% {
        -webkit-box-shadow: 0 0 0 10px rgba(75, 162, 242, 1);
    }
    100% {
        -webkit-box-shadow: 0 0 0 0 rgba(75, 162, 242, 1);
    }
}
@keyframes pulse {
    0% {
        -moz-box-shadow: 0 0 0 0 rgba(75, 162, 242, 2);
        box-shadow: 0 0 0 0 rgba(75, 162, 242, 2);
    }
    70% {
        -moz-box-shadow: 0 0 0 10px rgba(204,169,44, 0);
        box-shadow: 0 0 0 10px rgba(204,169,44, 0);
    }
    100% {
        -moz-box-shadow: 0 0 0 0 rgba(204,169,44, 0);
        box-shadow: 0 0 0 0 rgba(204,169,44, 0);
    }
}
