@import '../../_variables.scss';

.popper-wrapper {
  z-index: 8;
}

.popper-wrapper .popper__arrow {
  width: 0;
  height: 0;
  border-style: solid;
  position: absolute;
  margin: 5px;
}

.popper-wrapper[x-placement^="top"] {
  margin-bottom: 5px;
}

.popper-wrapper[x-placement^="top"] .popper__arrow {
  border-width: 5px 5px 0 5px;
  border-color: $fallback--bg transparent transparent transparent;
  border-color: var(--bg, $fallback--bg) transparent transparent transparent;
  bottom: -5px;
  left: calc(50% - 5px);
  margin-top: 0;
  margin-bottom: 0;
}

.popper-wrapper[x-placement^="bottom"] {
  margin-top: 5px;
}

.popper-wrapper[x-placement^="bottom"] .popper__arrow {
  border-width: 0 5px 5px 5px;
  border-color: transparent transparent $fallback--bg transparent;
  border-color: transparent transparent var(--bg, $fallback--bg) transparent;
  top: -5px;
  left: calc(50% - 5px);
  margin-top: 0;
  margin-bottom: 0;
}

.popper-wrapper[x-placement^="right"] {
  margin-left: 5px;
}

.popper-wrapper[x-placement^="right"] .popper__arrow {
  border-width: 5px 5px 5px 0;
  border-color: transparent $fallback--bg transparent transparent;
  border-color: transparent var(--bg, $fallback--bg) transparent transparent;
  left: -5px;
  top: calc(50% - 5px);
  margin-left: 0;
  margin-right: 0;
}

.popper-wrapper[x-placement^="left"] {
  margin-right: 5px;
}

.popper-wrapper[x-placement^="left"] .popper__arrow {
  border-width: 5px 0 5px 5px;
  border-color: transparent transparent transparent $fallback--bg;
  border-color: transparent transparent transparent var(--bg, $fallback--bg);
  right: -5px;
  top: calc(50% - 5px);
  margin-left: 0;
  margin-right: 0;
}

