/* 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.
*/

:host {
  /* Base ":host" styles for the component */
  box-sizing: border-box;
  background-color: var(--calcite-ui-foreground-1);
  color: var(--calcite-ui-text-2);
  font-size: var(--calcite-font-size--1);
}

:host * {
  box-sizing: border-box;
}

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

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

:host {
  width: 100%;
  height: 100%;
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  --calcite-shell-tip-spacing: 26vw;
}

.main {
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  position: relative;
  border-width: 0;
  border-top-width: 1px;
  border-bottom-width: 1px;
  border-style: solid;
  border-color: var(--calcite-ui-border-3);
  justify-content: space-between;
  overflow: hidden;
}

.main--reversed {
  flex-direction: row-reverse;
}

.content {
  display: flex;
  height: 100%;
  overflow: auto;
  width: 100%;
  border-width: 0;
  border-left-width: 1px;
  border-right-width: 1px;
  border-style: solid;
  border-color: var(--calcite-ui-border-3);
  flex-flow: column nowrap;
}

.content ::slotted(calcite-shell-center-row),
.content ::slotted(calcite-panel),
.content ::slotted(calcite-flow) {
  align-self: stretch;
  flex: 1 1 auto;
  max-height: unset;
}

.content--behind {
  border-width: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  display: initial;
}

::slotted(calcite-shell-center-row) {
  width: unset;
}

::slotted(.header .heading) {
  font-weight: var(--calcite-font-weight-normal);
  font-size: var(--calcite-font-size--2);
  line-height: 1.375;
}

::slotted(calcite-shell-panel),
::slotted(calcite-shell-center-row) {
  position: relative;
  z-index: 1;
}

slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])) {
  border-left-width: 1px;
  border-right-width: 1px;
  border-color: var(--calcite-ui-border-3);
}

::slotted(calcite-tip-manager) {
  border-radius: 0.25rem;
  box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  position: absolute;
  animation: in-up 300ms ease-in-out;
  box-sizing: border-box;
  bottom: 0.5rem;
  left: var(--calcite-shell-tip-spacing);
  right: var(--calcite-shell-tip-spacing);
  z-index: 2;
}