.wrapper {
  position: fixed;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: 320px;
  padding: 8px;
  background: var(--color-background-static-muted);
  @extend .pos-3dp;
  border-radius: var(--radii-large);
  z-index: var(--z-index-overlay);
  overflow: auto;

  &.noPadding {
    padding: 0;
  }

  &.wrapperEnter {
    transform: translateX(calc(100% + 8px));
  }

  &.wrapperEnterActive {
    transform: translateX(0);

    transition: var(--transition-medium);
    transition-property: transform;
  }

  &.wrapperExit {
    transform: translateX(0);
  }

  &.wrapperExitActive {
    transform: translateX(calc(100% + 8px));

    transition: var(--transition-medium);
    transition-property: transform;
  }
}

.backdrop {
  position: fixed;
  z-index: var(--z-index-overlay-backdrop);
  inset: 0;
  background: var(--color-background-overlay);
  cursor: pointer;
  opacity: 1;

  &.backdropEnter {
    opacity: 0;
    visibility: hidden;
  }

  &.backdropEnterActive {
    opacity: 1;
    visibility: visible;

    transition: var(--transition-medium);
    transition-property: opacity, visibility;
  }

  &.backdropExit {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
  }

  &.backdropExitActive {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: var(--transition-medium);
    transition-property: opacity, visibility;
  }
}

.closeButton.closeButton {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  pointer-events: none;

  &:focus {
    pointer-events: all;
    opacity: 1;
  }
}
