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

import { ProfileLink } from 'features/ProfileLink'

export const Description = styled.div<{isHidden?: boolean}>`
  padding: 22px 0 24px;
  display: flex;
  justify-content: space-between;
  color: #fff;

  ${isMobileDevice
    ? css`
        padding: 0 5px;
        align-items: baseline;
      `
    : ''};
  
  ${({ isHidden }) => (isHidden && isMobileDevice ? css`
      height: 0;
      opacity: 0;
      margin-bottom: 0;
    ` : '')}
`

export const DescriptionInnerBlock = styled.div`
  margin-right: 10px;
`

export const Score = styled.span`
  margin: 0 10px;
  color: inherit;
  white-space: nowrap;

  ${isMobileDevice
    ? css`
      margin: 0 5px;
    `
    : ''};
`

export const StyledLink = styled(ProfileLink)`
  display: flex;
  align-items: center;
  color: #fff;
  white-space: nowrap;

  &:hover {
    text-decoration: underline;
  }
`

export const Title = styled.div`
  display: flex;
  font-weight: 500;
  font-size: 20px;

  &:hover > ${StyledLink}:not(:hover) {
    opacity: 0.7;
  }

  &:hover > ${Score}:not(:hover){
    opacity: 0.7;
    pointer-events: none;
  }

  ${isMobileDevice
    ? css`
        font-size: 14px;
        margin-bottom: 5px;
      `
    : ''};
`

export const Views = styled.div`
  color: #fff;
  opacity: 0.7;
  font-size: 20px;

  ${isMobileDevice
    ? css`
      font-size: 10px;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
    `
    : ''};
`

export const MatchDate = styled.span`
  font-weight: 500;
`

export const Time = styled.span`
  font-weight: 300;
  margin-right: 10px;
  text-transform: uppercase;
`
