@import '../../styles/partials/colors';

.Candidate {
  line-height: 25px;
  &__imageWrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto;
    position: relative;
    margin-bottom: 20px;
  }
  &__infoHeaderWrapper {
    text-align: center;
  }
  &__image {
    border-radius: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    height: 100%;
    &.is-winner {
      border: 3px solid $primary-color;
    }
  }
  &__winner {
    position: absolute;
    left: 50%;
    color: #ffffff;
    transform: translateX(-50%);
    bottom: -6px;
    background-color: $primary-color;
    font-size: 0.65rem;
    border-radius: 10px;
    z-index: 2;
    padding: 0px 8px;
  }
  &__partyFlag {
    display: inline-block;
    width: auto;
    height: 30px;
    margin-bottom: 5px;
  }
  &__name {
    display: inline-block;
    margin-left: 6px;
    margin-bottom: 10px;
    font-size: 1.25rem;
  }
  &__party {
    display: inline-block;
    margin-left: 3px;
  }
  &__partyName {
    color: rgba($color: #000000, $alpha: 0.75);
    cursor: pointer;
    i {
      vertical-align: middle;
    }
  }
  &__senate {
    font-size: 0.875rem;
  }
  &__constituency {
    margin-top: 10px;
    display: inline-block;
    background-color: rgba($color: $primary-color, $alpha: 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
  }
  &__age {
    font-size: 1.5rem;
    color: $primary-color;
  }
  &__info {
    margin-bottom: 12px;
    .col-12 {
      margin-top: 5px;
      margin-bottom: 5px;
    }
  }
  &__infoLabel {
    font-size: 0.875rem;
    color: rgba($color: #000000, $alpha: 0.85);
  }
  .parent-info {
    div {
      &:first-child {
        margin-top: 0;
      }
    }
  }
  &__infoAnswer {
    font-size: 1rem;
  }
}

.competitors-wrapper {
  margin-top: 8px;
  margin-bottom: 0px;
}

.competitors-text {
  font-weight: 600;
  font-size: 1rem;
  margin: 5px 0;
}

@media (min-width: 1200px) {
  .Candidate {
    &__infoHeaderWrapper {
      text-align: left;
    }
    &__infoLabel {
      color: $primary-color;
    }
    &__infoAnswer {
      word-wrap: break-word;
    }
    &__partyFlag {
      margin-bottom: unset;
    }
    &__info {
      .col-12 {
        margin-top: 0;
        margin-bottom: 0;
      }
      .parent-type {
        color: $primary-color;
      }
    }
  }
  .competitors-wrapper {
    margin-top: 16px;
    margin-bottom: -6px;
  }
  .parent-info {
    margin-top: 0px;
    display: flex;
    justify-content: space-between;
    &-name {
      width: 50%;
    }
    &-ethnicity, &-religion {
      width: 25%;
    }
    .Candidate__infoLabel {
      color: rgba($color: #000000, $alpha: 0.65);
    }
    div {
      &:first-child {
        margin-left: 0;
      }
      margin-left: 5px;
      margin-right: 5px;
    }
  }
}
