import styled from 'styled-components'
import { colours, screenSizes } from '../../assets/theme'
import { Label, H2 } from '../Text'
import Flexbox, { Row as FlexRow, Column as FlexColumn } from '../Flex'
import Button from '../Button'

export const ButtonRow = styled(Flexbox)`
  width: 100%;
  align-items: stretch;

  button, a{
    font-size: 16px;
    width: 49%;
    height: 100%;
  }

  a button {
    width: 100%;
  }

  @media screen and (min-width: ${screenSizes.md}px) and (max-width: ${screenSizes.lg}px) {
    flex-direction: column;

    button, a {
      width: 100%;
    }
  }

`

export const Left = styled(FlexColumn)`
  margin-right: 1em;
  width: 20vw;

@media screen and (max-width: ${screenSizes.md}px) {
    width: 80vw;
    margin-right: 0em;
  }
  `

export const Center = styled(FlexColumn)`
@media screen and (max-width: ${screenSizes.md}px) {
  order: 2;
}
  `

export const Title = styled(H2)`
  max-width: 60%;

  @media screen and (max-width: ${screenSizes.md}px) {
    max-width: 80%;
  }

  @media screen and (max-width: ${screenSizes.sm}px) {
    max-width: 70%;
  }
  margin-bottom: 1em;
  `

export const Right = styled.div`
  flex: 1;
  text-align: right;
  
  @media screen and (max-width: ${screenSizes.md}px) {
    position: relative;
    top: 1em;
    order: 1;
  }
`
export const StyledButton = styled(Button)`
  /* width: max-content; */
  margin-top: 0.5em;
  padding: 0.3em 2em;

  @media screen and (max-width: ${screenSizes.md}px) {
    margin: 0.5em 0;
  }
`

export const Img = styled.div`
  background: url(${({ src }) => src});
  /* height: 215px; */
  width: 20vw;
  padding-bottom: calc((9 / 16) * 100%);
  background-size: cover;
  position: relative;
  background-position: center;
  
  @media screen and (max-width: ${screenSizes.md}px) {
    width: 80vw;
  }
`