/* 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);
  }
}
:root {
  --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
  --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
  --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
  --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
  --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
}

.calcite-animate {
  opacity: 0;
  animation-fill-mode: both;
  animation-duration: var(--calcite-animation-timing);
}

.calcite-animate__in {
  animation-name: in;
}

.calcite-animate__in-down {
  animation-name: in-down;
}

.calcite-animate__in-up {
  animation-name: in-up;
}

.calcite-animate__in-scale {
  animation-name: in-scale;
}

/**
* Currently only used in Checkbox.
*/
:root {
  --calcite-popper-transition: var(--calcite-animation-timing);
}

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

:host {
  pointer-events: none;
  display: flex;
  flex: 0 1 auto;
  align-items: stretch;
  --calcite-shell-panel-detached-max-height: unset;
}

.container {
  pointer-events: none;
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  background-color: transparent;
  font-size: var(--calcite-font-size--1);
  color: var(--calcite-ui-text-2);
}
.container * {
  box-sizing: border-box;
}

:host(:hover) .separator:not(:hover):not(:focus), :host(:focus-within) .separator:not(:hover):not(:focus) {
  opacity: 1;
  background-color: var(--calcite-ui-border-3);
}

.separator {
  pointer-events: auto;
  position: absolute;
  bottom: 0px;
  top: 0px;
  z-index: 10;
  display: flex;
  height: 100%;
  width: 0.125rem;
  background-color: transparent;
  opacity: 0;
  transition-property: all;
  transition-duration: var(--calcite-animation-timing);
  transition-timing-function: ease-in-out;
  transition-delay: 0s;
  cursor: col-resize;
  outline: none;
}
.separator:hover {
  opacity: 1;
  background-color: var(--calcite-ui-border-2);
}
.separator:focus {
  background-color: var(--calcite-ui-brand);
  opacity: 1;
}

:host([position=start]) .separator {
  inset-inline-end: -2px;
}

:host([position=end]) .separator {
  inset-inline-start: -2px;
}

::slotted(calcite-panel), ::slotted(calcite-flow) {
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  max-height: unset;
  max-width: unset;
}

::slotted(.calcite-match-height) {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

.content {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  align-self: stretch;
  background-color: var(--calcite-ui-background);
  padding: 0px;
  width: var(--calcite-shell-panel-width);
  max-width: var(--calcite-shell-panel-max-width);
  min-width: var(--calcite-shell-panel-min-width);
  transition: max-height var(--calcite-animation-timing), max-width var(--calcite-animation-timing);
}

.content__header {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}

.content__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

:host([width-scale=s]) .content {
  --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw);
  --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px);
  --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px);
}

:host([width-scale=m]) .content {
  --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw);
  --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px);
  --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px);
}

:host([width-scale=l]) .content {
  --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw);
  --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px);
  --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px);
}

:host([detached-height-scale=s]) .content--detached {
  --calcite-shell-panel-detached-max-height: 40vh;
}

:host([detached-height-scale=m]) .content--detached {
  --calcite-shell-panel-detached-max-height: 60vh;
}

:host([detached-height-scale=l]) .content--detached {
  --calcite-shell-panel-detached-max-height: 80vh;
}

.content--detached {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: auto;
  height: auto;
  border-radius: 0.25rem;
  --tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  overflow: hidden;
  max-height: var(--calcite-shell-panel-detached-max-height);
}
.content--detached ::slotted(calcite-panel),
.content--detached ::slotted(calcite-flow) {
  max-height: unset;
}

:host([position=start]) .content--detached ::slotted(calcite-panel), :host([position=start]) .content--detached ::slotted(calcite-flow), :host([position=end]) .content--detached ::slotted(calcite-panel), :host([position=end]) .content--detached ::slotted(calcite-flow) {
  border-style: none;
}

.content[hidden] {
  display: none;
}

slot[name=action-bar]::slotted(calcite-action-bar), .content ::slotted(calcite-flow), .content ::slotted(calcite-panel) {
  border-width: 1px;
  border-style: solid;
  border-color: var(--calcite-ui-border-3);
}

:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),
:host([position=start]) .content ::slotted(calcite-flow),
:host([position=start]) .content ::slotted(calcite-panel) {
  border-inline-start: none;
}

:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),
:host([position=end]) .content ::slotted(calcite-flow),
:host([position=end]) .content ::slotted(calcite-panel) {
  border-inline-end: none;
}