/* ---------------------------------
-----  dimension variables --------
---------------------------------- */
/* ------  standard elements padding & margin  ------- */
/* spacing */
/**
**  Official Font sizes
------------------------------- */
/**
** Line-heights
------------------------------- */
/*
  Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
  Add an arbitrary list of selectors into the arguments, and the styling in the block.
  I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

  There are two mixins:
  - focus-visible: a generic focus-visible, giving you "slots" to decide what to render for :focus, :focus reset, and :focus-visible
  - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

  Use focus-visible:
  The key thing here is checking which slot is being rendered.
  For example, you can reset box-shadow here, or anything else.

  @include focus-visible using ($slot) {
      @if $slot == focus {
          outline: 2px solid transparent;
          box-shadow: 0 0 0 4px blue;
      }
      @if $slot == focusReset {
          box-shadow: none;
      }
      @if $slot == focusVisible {
          box-shadow: 0 0 0 4px blue;
      }
  }

  Use focus-visible-outline:
  @include focus-visible-outline("button", "a[href]") {
      outline: 2px solid blue;
  }

  Resulting CSS (compressed):

  button:focus,
  a[href]:focus {
      outline: 2px solid blue;
  }

  button:focus:not(:focus-visible),
  a[href]:focus:not(:focus-visible) {
      outline: none;
  }
  button:focus-visible,
  a[href]:focus-visible {
      outline: 2px solid blue;
  }
*/
:host {
  height: 0;
  overflow: visible;
  width: 0;
}

:host(.hydrated) {
  display: block;
}

.box {
  background-color: #fff;
  box-shadow: var(--ux-tooltip-box-shadow);
  height: auto;
  overflow: visible;
  padding: var(--ux-tooltip-padding);
  position: fixed;
  text-align: left;
  visibility: hidden;
  width: 300px;
  z-index: 999;
  top: var(--ux-tooltip-box-top, auto);
  left: var(--ux-tooltip-box-left, auto);
  border: var(--ux-tooltip-border, none);
}
.box--active {
  visibility: inherit;
}

.box > * {
  padding-right: 20px;
}

.tip {
  position: absolute;
  left: var(--ux-tooltip-custom-tip-position, 50%);
  top: 100%;
}
.tip::before {
  border-color: var(--ux-tooltip-border-color) transparent transparent;
  border-style: solid;
  border-width: var(--ux-tooltip-tip-size);
  transform: translate(0, 1px);
  content: var(--ux-tooltip-tip-border-content, none);
  margin-left: var(--ux-tooltip-tip-margin-left);
  position: absolute;
  z-index: 1;
}
.tip::after {
  border-color: #fff transparent transparent;
  border-style: solid;
  border-width: var(--ux-tooltip-tip-size);
  content: "";
  margin-left: var(--ux-tooltip-tip-margin-left);
  position: absolute;
  z-index: 1;
}
.tip-shadow {
  box-shadow: var(--ux-tooltip-tip-shadow);
  height: 15px;
  position: absolute;
  width: 2px;
  z-index: -1;
}

.box--right {
  transform: translateY(-50%);
}
.box--right .tip {
  top: 50%;
  left: -30px;
}
.box--right .tip::after {
  border-color: transparent #fff transparent transparent;
  transform: translate(50%, -50%);
}
.box--right .tip-shadow {
  box-shadow: -10px 5px 15px 0.6px rgba(0, 0, 0, 0.3);
  height: 2px;
  left: 10px;
  transform: translate(50%, -50%);
  width: 15px;
}

.box--left {
  transform: translate(-100%, -50%);
}
.box--left .tip {
  left: 100%;
  top: 50%;
}
.box--left .tip::after {
  border-color: transparent transparent transparent #fff;
  transform: translate(50%, -50%);
}
.box--left .tip-shadow {
  box-shadow: 5px 5px 15px 0.6px rgba(0, 0, 0, 0.3);
  height: 2px;
  width: 15px;
}

.box--top {
  transform: translate(-50%, -100%);
}
.box--top .tip {
  bottom: 0;
}

.box--bottom {
  transform: translateX(-50%);
}
.box--bottom .tip {
  top: -30px;
}
.box--bottom .tip::after {
  border-color: transparent transparent #fff transparent;
}
.box--bottom .tip-shadow {
  box-shadow: 0 -10px 15px 0.6px rgba(0, 0, 0, 0.3);
  top: 20px;
}

.box--top-edge .tip {
  bottom: 0%;
  transform: translate(0px, -1px);
}
.box--top-edge .tip::before {
  border-width: 0 0 11px 11px;
  border-color: transparent transparent transparent var(--ux-tooltip-border-color);
  transform: translate(-1px, 2px);
}
.box--top-edge .tip::after {
  border-width: 0 0 11px 11px;
  border-color: transparent transparent transparent #fff;
}
.box--top-edge .tip-shadow {
  display: none;
}
.box--top-edge .tip.tip--right::before {
  border-width: 0 11px 11px 0;
  border-color: transparent var(--ux-tooltip-border-color) transparent transparent;
}
.box--top-edge .tip.tip--right::after {
  border-width: 0 11px 11px 0;
  border-color: transparent #fff transparent transparent;
  transform: translate(-2px, 0);
}

.box--bottom-edge .tip {
  top: -10px;
}
.box--bottom-edge .tip::before {
  border-width: 11px 0 0 11px;
  border-color: transparent transparent transparent var(--ux-tooltip-border-color);
  transform: translate(-1px, -2px);
}
.box--bottom-edge .tip::after {
  border-width: 11px 0 0 11px;
  border-color: transparent transparent transparent #fff;
}
.box--bottom-edge .tip-shadow {
  display: none;
}
.box--bottom-edge .tip.tip--right::before {
  border-width: 11px 11px 0 0;
  border-color: transparent var(--ux-tooltip-border-color) transparent transparent;
}
.box--bottom-edge .tip.tip--right::after {
  border-width: 11px 11px 0 0;
  border-color: transparent #fff transparent transparent;
  transform: translate(-2px, 0px);
}

.box--tip-right {
  transform: translateX(-100%);
}

.tip--right {
  right: -11px;
  left: auto;
}

.wrapper {
  max-height: var(--ux-tooltip-max-height, none);
  overflow-y: var(--ux-tooltip-overflow-y, visible);
}

.wrapper--text-only-mode {
  color: var(--ux-tooltip-text-color);
  font-size: var(--ux-tooltip-font-size);
  line-height: var(--ux-tooltip-line-height);
  font-family: var(--ux-font);
  margin-bottom: 0px;
  margin-top: 0px;
}