import { css } from 'styled-components';
import {
  CAP_SPACE_16,
  CAP_PRIMARY,
  CAP_G06,
} from '@capillarytech/cap-ui-library/styled/variables';

export default css`
  .ant-radio-group.cap-radioCard-v2 {
    .ant-radio-button-wrapper {
      margin-left: 0;
      margin-right: 0;
    }

    .icon-container {
      background-color: transparent;

      .anticon {
        color: ${CAP_G06};
      }

      &.green-color {
        background-color: transparent;

        .anticon {
          color: ${CAP_PRIMARY.base};
        }
      }
    }
  }

  .is-scrollable-section {
    height: calc(100vh - 150px);
    overflow-y: auto;
  }

  .radio-group-heading {
    margin-top: ${CAP_SPACE_16};
  }

  .submit-button-section {
    margin-top: ${CAP_SPACE_16};
  }

  .ant-radio-button-wrapper-checked {
    &:not(.ant-radio-button-wrapper-disabled) {
      box-shadow: none;
    }
  }

  .ant-radio-group.cap-radioCard-v2 {
    .ant-radio-button-wrapper-checked .radio-card-checked {
      display: none;
    }
  }

  .non-selected-radio-group {
    .ant-radio-button-wrapper {
      &:last-child {
        display: none;
      }
    }
  }

  .selected-radio-group {
    .ant-radio-button-wrapper-checked {
      &:not(.ant-radio-button-wrapper-disabled) {
        box-shadow: -1px 0 0 0 ${CAP_PRIMARY.base};
      }
    }

    .ant-radio-group.cap-radioCard-v2 {
      .ant-radio-button-wrapper-checked .radio-card-checked {
        display: block;
      }
    }
  }
`;
