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

import { lff as platformLff } from 'config/clients/lff'

import { isMobileDevice } from 'config/userAgent'
import type { ClientConfig } from './types'

const Background = styled.div`
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  background: linear-gradient(18.42deg, #242321 8.36%, #242321 42.61%, #DB1C49 86.2%);
`

export const lff: ClientConfig = {
  ...platformLff,
  background: Background,
  styles: {
    centerBlock: css`
      margin-top: 6.15rem;
      ${isMobileDevice ? css`
        margin-top: 60px;
        @media screen and (orientation: landscape) {
          width: 290px;
          margin-top: 5px;
        }
      ` : ''};
    `,
    input: css`
      background-color: transparent;
      :not(:last-of-type) {
        border-color: ${({ theme }) => theme.colors.white50};
      }
    `,
    inputGroup: css`
      border: 1px solid ${({ theme }) => theme.colors.white};
    `,
    logo: css`
      background-image: url(/images/lff_auth_logo.svg);
      height: 220px;
      width: 220px;
      margin-bottom: 1rem;
      
      ${isMobileDevice ? css`
          margin-bottom: 15px;
          width: 74px;
          height: 74px;
        ` : ''}
    `,
    submitButton: css`
      background-color: #DF1C4A;
      color: white;
    `,
  },
}
