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

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

import { Checkbox as BaseCheckbox } from 'features/Common/Checkbox'
import { Label } from 'features/Common/Checkbox/styled'
import { CheckboxSvg } from 'features/Common/Checkbox/Icon'

export const Wrapper = styled.div`
  min-width: 264px;
  display: flex;
  flex-direction: column;

  @media ${devices.tablet} {
    min-width: 13rem;
  }

  ${isMobileDevice
    ? css`
      @media (orientation: landscape){
        min-width: 35%;
      }
    `
    : ''};
`

export const List = styled.ul`
  width: 100%;
  margin-top: 6px;
`

export const Item = styled.li`
  width: 100%;
  display: flex;
  padding: 6px 0;
`

export const Checkbox = styled(BaseCheckbox)`
  ${Label} {
    font-weight: normal;
    font-size: 0.66rem;
    line-height: 1rem;
    ${isMobileDevice
    ? css`
      @media (max-width: 650px),(orientation: landscape){
        font-size: 12px;
      }
    `
    : ''};
  }
  ${CheckboxSvg} {
    margin-right: 12px;
  }
`
