/**
 * @file
 * Element help styles.
 */

:root {
  --background-color: #fff;
  --color: #595959;
  --timing: 150ms;
}

[data-tippy] {
  position: relative;
}

[data-tippy]::before,
[data-tippy]::after {
  display: block;
  font-family: sans-serif;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  transform: translate(-50%, 0);
  transform-origin: top;
  z-index: 99999;
}

[data-tippy]::before {
  background-color: var(--background-color);
  border-radius: 3px;
  box-shadow: -8px 2px 8px rgba(163, 163, 163, 0.55);
  color: var(--color);
  content: attr(data-tippy);
  font-size: 14px;
  font-weight: normal;
  margin-top: 10px;
  padding: 12px;
  text-align: left;
  white-space: pre-wrap;
  width: 300px;
  z-index: 1;
}

[data-tippy]::after {
  border: 5px solid transparent;
  border-bottom-color: var(--background-color);
  content: '';
}

[data-tippy]:hover::before,
[data-tippy]:hover::after ,
[data-tippy]:focus::before,
[data-tippy]:focus::after {
  transform: translate(-50%, 0);
}

/* reset for other positions */

[data-tippy][data-tippy-pos]::before {
  left: auto;
  margin-top: auto;
  top: auto;
  transform: none;
}

[data-tippy][data-tippy-pos]::after {
  border-bottom-color: transparent;
  left: auto;
  margin-top: auto;
  top: auto;
  transform: none;
}

/* end reset */

/* up and down */

[data-tippy][data-tippy-pos='up']::before,
[data-tippy][data-tippy-pos='up']::after,
[data-tippy][data-tippy-pos='down']::before,
[data-tippy][data-tippy-pos='down']::after {
  left: 50%;
}

/* up */

[data-tippy][data-tippy-pos='up']::before,
[data-tippy][data-tippy-pos='up']::after {
  bottom: 100%;
  transform: translate(-50%, 0);
}

[data-tippy][data-tippy-pos='up']::before {
  margin-bottom: 10px;
}

[data-tippy][data-tippy-pos='up']::after {
  border-bottom-color: transparent;
  border-top-color: var(--background-color);
}

/* down */

[data-tippy][data-tippy-pos='down']::before,
[data-tippy][data-tippy-pos='down']::after {
  top: 100%;
  transform: translate(-50%, 0);
}

[data-tippy][data-tippy-pos='down']::before {
  margin-top: 10px;
}

[data-tippy][data-tippy-pos='down']::after {
  border-bottom-color: var(--background-color);
  border-top-color: transparent;
}

/* left and right */

[data-tippy][data-tippy-pos='left']::before,
[data-tippy][data-tippy-pos='left']::after,
[data-tippy][data-tippy-pos='right']::before,
[data-tippy][data-tippy-pos='right']::after {
  top: 50%;
}

/* left */

[data-tippy][data-tippy-pos='left']::before,
[data-tippy][data-tippy-pos='left']::after {
  right: 100%;
  transform: translate(0, -50%);
}

[data-tippy][data-tippy-pos='left']::before {
  margin-right: 10px;
}

[data-tippy][data-tippy-pos='left']::after {
  border-left-color: var(--background-color);
}

/* right */

[data-tippy][data-tippy-pos='right']::before,
[data-tippy][data-tippy-pos='right']::after {
  left: 100%;
  transform: translate(0, -50%);
}

[data-tippy][data-tippy-pos='right']::before {
  margin-left: 15px;
  margin-top: 30px;
}

[data-tippy][data-tippy-pos='right']::after {
  border-color: transparent #fff;
  border-right-color: var(--background-color);
  border-width: 7px 18px 12px 0;
}

/* hover */

[data-tippy]:hover::before,
[data-tippy]:hover::after,
[data-tippy]:focus::before,
[data-tippy]:focus::after {
  opacity: 1;
}

/* animated - fade (default) */

[data-tippy][data-tippy-animate]::before,
[data-tippy][data-tippy-animate]::after {
  transition: all var(--timing) ease-out;
  transition-delay: 0s;
}

[data-tippy][data-tippy-animate]:hover::before,
[data-tippy][data-tippy-animate]:hover::after {
  transition-delay: var(--timing);
}

/* animated - slide */

[data-tippy][data-tippy-animate='slide']::before,
[data-tippy][data-tippy-animate='slide']::after {
  transform: translate(-50%, -10px);
}

[data-tippy][data-tippy-animate='slide']:hover::before,
[data-tippy][data-tippy-animate='slide']:hover::after {
  transform: translate(-50%, 0);
}

[data-tippy][data-tippy-pos='up'][data-tippy-animate='slide']::before,
[data-tippy][data-tippy-pos='up'][data-tippy-animate='slide']::after {
  transform: translate(-50%, 10px);
}

[data-tippy][data-tippy-pos='down'][data-tippy-animate='slide']::before,
[data-tippy][data-tippy-pos='down'][data-tippy-animate='slide']::after {
  transform: translate(-50%, -10px);
}

[data-tippy][data-tippy-pos='up'][data-tippy-animate='slide']:hover::before,
[data-tippy][data-tippy-pos='up'][data-tippy-animate='slide']:hover::after,
[data-tippy][data-tippy-pos='down'][data-tippy-animate='slide']:hover::before,
[data-tippy][data-tippy-pos='down'][data-tippy-animate='slide']:hover::after {
  transform: translate(-50%, 0);
}

[data-tippy][data-tippy-pos='left'][data-tippy-animate='slide']::before,
[data-tippy][data-tippy-pos='left'][data-tippy-animate='slide']::after {
  transform: translate(10px, -50%);
}

[data-tippy][data-tippy-pos='right'][data-tippy-animate='slide']::before,
[data-tippy][data-tippy-pos='right'][data-tippy-animate='slide']::after {
  transform: translate(-10px, -50%);
}

[data-tippy][data-tippy-pos='left'][data-tippy-animate='slide']:hover::before,
[data-tippy][data-tippy-pos='left'][data-tippy-animate='slide']:hover::after,
[data-tippy][data-tippy-pos='right'][data-tippy-animate='slide']:hover::before,
[data-tippy][data-tippy-pos='right'][data-tippy-animate='slide']:hover::after {
  transform: translate(0, -50%);
}

/* animated - bubble */

[data-tippy][data-tippy-animate='bubble']::before,
[data-tippy][data-tippy-animate='bubble']::after {
  opacity: 1;
  visibility: hidden;
}

[data-tippy][data-tippy-animate='bubble']:hover::before,
[data-tippy][data-tippy-animate='bubble']:hover::after {
  visibility: visible;
}

[data-tippy][data-tippy-animate='bubble']::before {
  clip-path: circle(10% at 50% 0);
}

[data-tippy][data-tippy-animate='bubble']:hover::before {
  clip-path: circle(100% at 50%);
}

[data-tippy][data-tippy-pos='up'][data-tippy-animate='bubble']::before {
  clip-path: circle(10% at 50% 100%);
}

[data-tippy][data-tippy-pos='up'][data-tippy-animate='bubble']:hover::before {
  clip-path: circle(100% at 50%);
}

[data-tippy][data-tippy-pos='down'][data-tippy-animate='bubble']::before {
  clip-path: circle(10% at 50% 0);
}

[data-tippy][data-tippy-pos='down'][data-tippy-animate='bubble']:hover::before {
  clip-path: circle(100% at 50%);
}

[data-tippy][data-tippy-pos='left'][data-tippy-animate='bubble']::before {
  clip-path: circle(10% at 100% 50%);
}

[data-tippy][data-tippy-pos='left'][data-tippy-animate='bubble']:hover::before {
  clip-path: circle(100% at 50%);
}

[data-tippy][data-tippy-pos='right'][data-tippy-animate='bubble']::before {
  clip-path: circle(10% at 0 50%);
}

[data-tippy][data-tippy-pos='right'][data-tippy-animate='bubble']:hover::before {
  clip-path: circle(100% at 50%);
}

/* force display */

[data-tippy][data-tippy-visible]::before,
[data-tippy][data-tippy-visible]::after {
  opacity: 1;
  visibility: visible;
}

/* sizes */

[data-tippy][data-tippy-size='tiny']::before {
  font-size: 10px;
}

[data-tippy][data-tippy-size='small']::before {
  font-size: 12px;
}

[data-tippy][data-tippy-size='large']::before {
  font-size: 16px;
}

[data-tippy][data-tippy-size='jumbo']::before {
  font-size: 20px;
}

.css-tooltip-toggle {
  background-color: transparent;
  background-image: url('../images/questionmark-disc-000000.svg');
  background-size: cover;
  border: 0;
  height: 25px;
  position: absolute;
  right: 10px;
  top: 40px;
  width: 25px;
}
