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

import { isMobileDevice } from 'config/userAgent'

import { Wrapper } from '../TimeTooltip/styled'

export const ProgressBarList = styled.div<{isIOS?: boolean}>`
  flex-grow: 1;
  height: 4px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;

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

  ${({ isIOS }) => (isIOS && isMobileDevice
      && css`
        height: 3px;
        margin: 0 24px;
    `)}
`
export const ScrubberContainer = styled.div`
  ${isMobileDevice
    ? css`
        position: relative;
        margin: 0 7px;
      `
    : ''}
  
`

export const Scrubber = styled.div<{isIOS?: boolean}>`
  border: none;
  outline: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, -38%);
  z-index: 3;
  width: 18px;
  height: 18px;
  background-color: #CC0000;
  border-radius: 50%;
  cursor: pointer;
  
  :hover ${Wrapper} {
    visibility: visible;
  }

  ${isMobileDevice
    ? css`
      width: 14px;
      height: 14px;
      background-color: #FFFFFF;
      transform: translate(-50%, -48%);
    `
    : ''}

  ${({ isIOS }) => (isIOS && isMobileDevice
    ? css`
      width: 30px;
      height: 30px;
      transform: translate(-50%, -53%);
    `
    : '')}
`
