import styled from 'styled-components/macro'

import { devices } from 'config'

import { Radio as BaseRadio } from 'features/Common'
import { Label } from 'features/Common/Radio/styled'
import { RadioSvg } from 'features/Common/Radio/Icon'

type Props = {
  marginTop?: number,
}

export const Wrapper = styled.div<Props>`
  display: flex;
  flex-direction: column;
  padding-left: 35px;
  padding-right: 20px;
  margin-top: ${({ marginTop }) => `${marginTop ?? 62}px`};

  @media ${devices.mobile} {
    margin-top: 14px;
    padding: 0 12px;
  }
`
export const List = styled.ul`
  display: flex;
  flex-direction: column;
  margin: 15px 0;

  @media ${devices.mobile} {
    padding: 0 2px;
  }
`

export const Item = styled.li`
  :not(:last-child) {
    margin-bottom: 20px;
  }

  @media ${devices.mobile} {
    height: 44px;

    :not(:last-child) {
      margin-bottom: 0;
    }
  }
`

export const Radio = styled(BaseRadio)`
  ${Label} {
    color: #ffffff;
    font-weight: normal;
    font-size: 20px;
    line-height: 21px;
  }

  ${RadioSvg} {
    margin-right: 15px;
  }

  @media ${devices.mobile} {
    width: 100%;
    height: 100%;

    ${Label} {
      height: 100%;
      font-size: 16px;
      line-height: 20px;
      letter-spacing: 0.1px;
    }
  }
`
