import styled, { css } from 'styled-components/macro'

import { devices } from 'config/devices'
import { isMobileDevice } from 'config/userAgent'

import { Label } from 'features/Common/Radio/styled'
import { RadioSvg } from 'features/Common/Radio/Icon'
import { Radio } from 'features/Common'
import { Arrows as ArrowsBase } from 'features/ArrowLoader/Icon'

import { InlineButton } from '../../styled'

export const CardNumberWrapper = styled.div`
  position: relative;
  max-width: 560px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #3F3F3F;
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;

  :hover ${InlineButton} {
    transform: translateX(0);
  }

  ${isMobileDevice
    ? css`
     height: 39px;
    `
    : ''};
`

export const CustomRadio = styled(Radio)`
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;

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

  ${Label} {
    height: 100%;
    width: 100%;
    font-size: 20px;
    line-height: 24px;
    margin-left: 25px;
    text-transform: capitalize;
  }

  @media ${devices.tablet} {
    max-width: 415px;

    ${Label} {
      font-size: 16px;
    }
  }

  @media ${devices.mobile} {
    max-width: 335px;

    ${Label} {
      font-size: 14px;
      line-height: 24px;
      white-space: nowrap;
    }
  }
`

export const Arrows = styled(ArrowsBase)`
  width: 20px;
  height: 20px;
`
