/* stylelint-disable */
@import "../../settings/includes/colors";

.c-descriptive-radio-button {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;


  @media (min-width: 768px) {
    > *:first-of-type {
      margin-right: 24px;
    }
  }
}

.c-descriptiveRadioButton-container {
  height: 192px;
  width: 100%;
  max-width: 360px;
  border: solid 2px map-get($MonoPalette, 50);
  border-radius: 4px;
  display: inline-flex;
  margin: 12px 0;
  padding: 24px;
  cursor: pointer;
  flex-direction: column;
  position: relative;
  background-color: $White;

  @media (min-width: 768px) {
    width: calc(50% - 12px);
  }

  input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
    user-select: none;
  }

  .custom-radio--button {
    flex-shrink: 0;
    margin-left: 0;
    margin-top: 16px;
  }

  .custom-radio--icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }


  .main-text-container {
    display: flex;
    flex-direction: row;
  }

  .supporting-text-container {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    width: 100%;
    background-color: map-get($CornflowerPalette, 10);

    p {
      font-size: 14px;
      font-weight: 500;
      line-height: 1.29;
      padding: 0 8px;
      color: $Fiord;

      a {
        font-weight: 700;
        text-decoration: underline;
      }
    }
  }

  .image-container {
    width: 72px;
    justify-content: center;
    align-items: baseline;
    margin-right: 8px;
    display: none;

    @media (min-width: 480px) {
      display: flex;
    }
  }

  .title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.25;
    color: $Fiord;
    margin-bottom: 8px;
  }

  .subtitle {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.29;
    color: $Fiord;
  }

  &.is-checked {
    background-color: map-get($CornflowerPalette, 10);
    border-color: $Pacific;

    .supporting-text-container {
      background-color: $Fiord;

      p {
        color: $White;
      }
    }
  }

  &.is-disabled {
    .title {
      color: $Mono;
    }

    .subtitle {
      color: $Mono;
    }


    .supporting-text-container {
      background-color: $Mono;

      p {
        color: $White;
      }
    }

    .image-container {
      img {
        filter: grayscale(100%);
      }
    }
  }
}

.no-supporting {
  .c-descriptiveRadioButton-container {
    height: 144px;
  }
}
