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

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

import { customScrollbar } from 'features/Common/customScrollbar'

export const Wrapper = styled.div`
  overflow-y: auto;
  max-height: 70vh;

  ${customScrollbar}

  ${isMobileDevice
    ? css`
      @media (orientation: landscape){
        margin-top: 0;
        max-height: 100%;

      }
    `
    : ''}

`

export const Table = styled.table``

export const THead = styled.thead``

export const Th = styled.th`
  /* padding-right: 20px; */
  width: 250px;
  padding-bottom: 25px;
  font-weight: 500;
  font-size: 18px;
  line-height: 22px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-align: start;

  /* :nth-child(1) {
    width: 250px;
  }

  :nth-child(2) {
    width: 312px;
  }

  :nth-child(3) {
    width: 190px;
  } */

  /* @media ${devices.tablet} {
    :nth-child(1) {
      width: 200px;
    }

    :nth-child(2) {
      width: 270px;
    }

    :nth-child(3) {
      width: 150px;
    }
  } */
  ${isMobileDevice
    ? css`
      font-size: 10px;
      display: flex;
      flex-direction: column;
      padding: 5px 0;
    `
    : ''}
`

export const TBody = styled.tbody``

export const TRow = styled.tr`
  td.subscription {
    width: 350px;
    text-transform: capitalize;
  }
`

export const Td = styled.td`
  /* padding-right: 20px; */
  width: 250px;
  padding-bottom: 20px;
  font-size: 18px;
  line-height: 22px;
  text-align: start;
  color: #FFFFFF;
  word-wrap: break-word;
  max-width: 400px;
  text-transform: uppercase;
  vertical-align: top;

  ${isMobileDevice
    ? css`
      font-size: 12px;
      line-height: 17px;
      vertical-align: baseline;
      :not(:nth-child(1)){
        padding-right: 5px;
      }
    `
    : ''}
`

export const ScPaymentDate = styled.div`
  font-weight: 500;
  font-size: 14px;
  line-height: 17px;
  color: #FFFFFF;
  `

export const ScFirstBlock = styled.div`
  display: flex;
  flex-direction: row;
  `

export const ScSecondBlock = styled.div`
  display: flex;
  flex-direction: column;

  .subscription {
    width: 100%;
    word-wrap: break-word;
  }
  `

export const ScPayment = styled.div`
  margin-bottom: 25px;
  `

export const ScText = styled.span`
  font-weight: 500;
  font-size: 14px;
  line-height: 17px;
  color: rgba(255, 255, 255, 0.6);
  `
