import styled from 'styled-components'
import theme from 'theme'

export const WrapperMenu = styled.ul`
  float: left;
  list-style: none;
  margin: 0;
  padding-left: 0;
`
/* stylelint-disable order/properties-alphabetical-order */
export const WrapperMenuItem = styled.li`
  border-bottom: 1px;
  display: block;
  float: ${props => props.float};
  position: relative;

  :after ${props =>
    !props.active
      ? `{}`
      : `{
    background-image: ${theme.gradients['menu-blue']};
    bottom: 0;
    content: '';
    display: block;
    height: 2px;
    position: absolute;
    width: 100%;
  }`};
`
/* stylelint-enable order/properties-alphabetical-order */

export const MenuItem = styled.button`
  background: transparent;
  border: none;
  color: ${theme.textStyles.navbarMenu.color};
  cursor: pointer;
  font: ${theme.textStyles.navbarMenu.font};
  letter-spacing: 0.5px;
  padding: 6px;

  :focus {
    outline: none;
  }

  :hover {
    color: ${theme.colors['blue-cyan']};
  }
`

export const MenuOption = styled.button`
  background: transparent;
  border: none;
  color: ${theme.colors['dark-blue2']};
  cursor: pointer;
  font: ${theme.textStyles.navbarMenu.font};
  letter-spacing: 0.5px;
  opacity: 0.6;
  padding: 6px 6px 6px 15px;

  :focus {
    outline: none;
  }

  :hover {
    opacity: 1;
  }
`

export const Caret = styled.span`
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px dashed;
  display: inline-block;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  width: 0;
`

export const WrapperMenuDropdown = styled.ul`
  background: ${theme.colors.white};
  border-radius: 4px;
  box-shadow: 3px 4px 6px ${theme.shadows['light-grey-2']};
  display: ${({ visible }) => (visible ? 'block' : 'none')};
  margin: 10px 0 0;
  padding: 10px 0;
  position: absolute;
  width: 100%;

  ::after {
    border-color: ${theme.colors.white} transparent;
    border-style: solid;
    border-width: 0 15px 15px;
    content: '';
    display: block;
    margin: 0 35%;
    position: absolute;
    top: -7px;
    width: 0;
    z-index: 1;
  }
`
