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

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

import { Modal as ModalBase } from 'features/Modal'
import { ModalWindow } from 'features/Modal/styled'

export const Wrapper = styled.div`
  margin-top: 28px;
  ${isMobileDevice
    ? css`
      width: 100%;
      @media (orientation: landscape){
        margin-top: 0;
      }
    `
    : ''};
`

export const FormWrapper = styled.div`
  width: 560px;
  margin-top: 40px;

  @media ${devices.tablet} {
    max-width: auto;
  }
  ${isMobileDevice
    ? css`
      width: 100%;
      margin: 20px 0;
    `
    : ''};
`

export const PaymentInfoText = styled.span`
  display: inline-block;
  margin-top: 6px;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.3);
  ${isMobileDevice
    ? css`
      font-size: 10px;
    `
    : ''};
`

export const Modal = styled(ModalBase)`
  background-color: rgba(0, 0, 0, 0.7);
  ${ModalWindow} {
    padding: 40px 86px;
    background: #333333;
    border-radius: 5px;
  }
`

export const Header = styled.div`
  position: absolute;
  top: 15px;
  right: 0;
`

export const ModalBody = styled.div`
  display: flex;
  flex-direction: column;
  align-items: center;
`

export const InfoText = styled.div`
  font-weight: normal;
  font-size: 20px;
  line-height: 27px;
  margin-bottom: 40px;
  ${isMobileDevice
    ? css`
      font-size: 16px;
      text-align: center;
    `
    : ''};
`
