/* mixins & extensions */

@keyframes in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes in-down {
  0% {
    opacity: 0;
    transform: translate3D(0, -5px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3D(0, 0, 0);
  }
}

@keyframes in-up {
  0% {
    opacity: 0;
    transform: translate3D(0, 5px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3D(0, 0, 0);
  }
}

@keyframes in-scale {
  0% {
    opacity: 0;
    transform: scale3D(0.95, 0.95, 1);
  }

  100% {
    opacity: 1;
    transform: scale3D(1, 1, 1);
  }
}

/**
* Currently only used in Checkbox.
*/

:root {
  --calcite-popper-transition: 150ms ease-in-out;
}

:host([hidden]) {
  display: none;
}

:host {
  display: inline;
  --calcite-blue-accessible: #00619b;
  --calcite-link-blue-underline: rgba(0, 97, 155, 0.4);
}

:host([theme=dark]) {
  --calcite-blue-accessible: #00A0FF;
  --calcite-link-blue-underline: rgba(0, 160, 255, 0.4);
}

:host a,
:host span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 0;
  border: none;
  line-height: inherit;
  font-size: inherit;
  font-family: inherit;
  -webkit-appearance: none;
  cursor: pointer;
  transition: 150ms ease-in-out;
}

:host a:hover,
:host span:hover {
  text-decoration: none;
}

:host a,
:host span {
  outline-offset: 0;
  outline-color: transparent;
  transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
}

:host a:focus,
:host span:focus {
  outline: 2px solid var(--calcite-ui-blue-1);
  outline-offset: -2px;
}

.calcite-link--icon {
  transition: 150ms ease-in-out;
}

:host([disabled]) {
  pointer-events: none;
}

:host([disabled]) span,
:host([disabled]) a {
  pointer-events: none;
  opacity: var(--calcite-ui-opacity-disabled);
}

:host .calcite-link--icon.icon-start {
  margin-right: 0.5rem;
}

:host([dir=rtl]) .calcite-link--icon.icon-start {
  margin-right: 0;
  margin-left: 0.5rem;
}

:host .calcite-link--icon.icon-end {
  margin-left: 0.5rem;
}

:host([dir=rtl]) .calcite-link--icon.icon-end {
  margin-left: 0;
  margin-right: 0.5rem;
}

:host span,
:host a {
  display: inline;
  padding: 0;
  border: none;
  color: var(--calcite-blue-accessible);
  line-height: inherit;
  white-space: initial;
  background-color: transparent;
  position: relative;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--calcite-link-blue-underline), var(--calcite-link-blue-underline));
  background-position: 0% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  background-size: 0% 1px, 100% 1px;
  transition: all 0.15s ease-in-out, background-size 0.3s ease-in-out;
}

:host span:hover, :host span:focus,
:host a:hover,
:host a:focus {
  color: var(--calcite-ui-blue-1);
  background-size: 100% 1px, 100% 1px;
}

:host span:hover .calcite-link--icon, :host span:focus .calcite-link--icon,
:host a:hover .calcite-link--icon,
:host a:focus .calcite-link--icon {
  fill: var(--calcite-ui-blue-1);
}

:host span:active,
:host a:active {
  color: var(--calcite-blue-accessible);
  background-size: 100% 2px, 100% 2px;
}

:host([dir=rtl]) span,
:host([dir=rtl]) a {
  background-position: 100% 100%, 100% 100%;
}