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

import { isMobileDevice } from 'config/userAgent'

export const ModalContainer = styled.div`
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 51;
  color: white;
  font-weight: 600;
`

export const ModalWindow = styled.div`
  background-color: #313131;
  position: relative;
  padding: 15px;
  box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  ${isMobileDevice
    ? css`
      width: 90%;
      margin: auto;
      @media screen and (orientation: landscape){
        max-width: 489px;
      }
      @media (max-width: 600px) and (orientation: landscape){
        max-width: 100%;
      }
    `
    : ''};
`

export const ModalCloseButton = styled.button.attrs({
  'aria-label': 'Close',
})`
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  right: 0;
  border-style: none;
  outline: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin: 10px 10px 0 0;


`
