@import './variables.scss';

.dao-radio-grid {
  padding: 0 5px;
  position: relative;
  white-space: nowrap;
  &.disabled &-wrap {
    cursor: not-allowed;
  }
  svg.checked-icon {
    position: absolute;
    top: -8px;
    right: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    fill: #3890ff;
    background-color: #fff;
  }
  &.dao-card-col {
    white-space: normal;
  }
  &-wrap {
    padding: 22px 40px 16px;
    background-color: white;
    border: 1px solid #ccd1d9;
    border-radius: 4px;
    text-align: center;
    font-weight: 400;
    line-height: 21px;
    overflow: hidden;
    cursor: pointer;
    &.dao-card {
      padding: 0;
      text-align: left;
      position: relative;
      overflow: visible;
      cursor: pointer;
      svg.checked-icon {
        right: -8px;
      }
    }
    &:hover,
    &:focus {
      background-color: $radio-block-hover;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    }
  }
  &-img {
    display: inline-block;
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
    svg,
    img {
      width: 100%;
      height: 100%;
      fill: #9ba3af;
    }
  }
  &-headline,
  &-description {
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 21px;
  }
  &-headline {
    color: $radio-block-headline-color;
    font-size: 14px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  &-description {
    color: $radio-block-description-color;
    font-size: 12px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  &.active {
    .dao-radio-grid-wrap {
      opacity: 1;
      background-image: linear-gradient(0deg, #f0f7ff, #fbfdff);
      background-color: #f7fbff;
      border: 1px solid #3890ff;
      box-shadow: 0 0 0 2px rgba(56, 144, 255, 0.15);
    }
    .dao-radio-grid-img svg,
    .dao-radio-grid-img img {
      fill: #3890ff;
    }
  }
  &.card {
    float: none;
    padding: 0;
  }
}
