@use '../../../common/scss/global.scss';
@use './header-interactive.scss';
@use '~@kyndryl-design-system/shidoka-foundation/scss/mixins/typography.scss';

:host {
  display: block;
  height: 100%;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 40px;
  background: none;
  padding: 0;
  color: var(--kd-color-text-link);
}

.panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding-bottom: 8px;
  background: var(--kd-color-background-ui-soft);
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
  z-index: 1;
  transition: visibility 150ms ease-out, transform 150ms ease-out;
  visibility: hidden;
  transform: translateX(-100%);

  &.right {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }

  &.open {
    visibility: visible;
    transform: translateX(0);
  }

  @media (min-width: 42rem) {
    width: 320px;
  }
}

.heading {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  height: var(--kd-header-height);
  padding: 4px;
  background: var(--kd-color-background-ui-default);
  box-shadow: 0 1px 0 var(--kd-color-border-light);

  &__text {
    @include typography.type-ui-01;
    color: var(--kd-color-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 8px;
  }

  .right & {
    flex-direction: row-reverse;
  }
}

.content {
  flex-grow: 1;
  overflow-y: auto;
}

kd-icon {
  display: block;
}
