import styled from 'styled-components';

export const TargetContainer = styled.div`
  display: inline-block;
  margin-top: 100px;
  margin-left: 100px;
`;

export const TooltipContainer = styled('div')<{}>`
  z-index: 1000;
  color: #fff;
  border-radius: 2px;
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  min-height: 50px;
  min-width: 86px;
  box-sizing: border-box;

  &[data-placement*='bottom'] {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.30);
    margin-top: 10px;
  }
  &[data-placement*='top'] {
    box-shadow: 0 -4px 8px 0 rgba(0, 0, 0, 0.30);
    margin-bottom: 10px;
  }
  &[data-placement*='left'] {
    box-shadow: -4px 0 8px 0 rgba(0, 0, 0, 0.30);
    margin-right: 14px;
  }
  &[data-placement*='right'] {
    box-shadow: 4px 0 8px 0 rgba(0, 0, 0, 0.30);
    margin-left: 14px;
  }
`;

export const Arrow = styled('div')`
  position: absolute;
  width: 3em;
  height: 3em;
  box-sizing: border-box;

  &[data-placement*='bottom'] {
    top: -1px;
    left: 0;
    margin-top: -0.9em;
    width: 3em;
    height: 1em;
    &::before {
      border-width: 0 12px 12px 12px;
      border-color: transparent transparent rgba(0, 0, 0, 0.6) transparent;
    }
  }
  &[data-placement*='top'] {
    bottom: -1px;
    left: 0;
    margin-bottom: -0.9em;
    width: 3em;
    height: 1em;
    &::before {
      border-width: 12px 12px 0 12px;
      border-color: rgba(0, 0, 0, 0.6) transparent transparent transparent;
    }
  }
  &[data-placement*='right'] {
    left: -1px;
    margin-left: -0.9em;
    height: 3em;
    width: 1em;
    &::before {
      border-width: 12px 12px 12px 0;
      border-color: transparent rgba(0, 0, 0, 0.6) transparent transparent;
    }
  }
  &[data-placement*='left'] {
    right: -1px;
    margin-right: -0.9em;
    height: 3em;
    width: 1em;
    &::before {
      border-width: 12px 0 12px 12px;
      border-color: transparent transparent transparent rgba(0, 0, 0, 0.6);
    }
  }
  &::before {
    content: '';
    margin: auto;
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
  }
`;
