@use "../../../styles/int.scss";

.container {
  isolation: isolate;
  position: fixed;
  inset: 0;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  pointer-events: none;

  @include int.election-layer-zindex("drawer");

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-in-out;
  }

  &.open::before {
    opacity: 1;
    pointer-events: all;
  }
}

.controls {
  width: 100%;
}

.drawer {
  position: absolute;
  z-index: 1;
  inset: 0;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .2s ease-in-out,
    opacity .01s linear .2s,
    visibility .01s linear .2s;
  opacity: 0;
  pointer-events: all;
  height: 100%;
  overflow-y: auto;

  @include int.breakpoint-at-least("sm") {
    left: unset;
    width: 376px;
    transform: translateX(100%);
  }

  .open & {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: transform .2s ease-in-out,
      opacity .01s linear,
      visibility .01s linear;

    @include int.breakpoint-at-least("sm") {
      transform: translateX(0);
    }
  }

  &.defaultPadding {
    padding: int.$spacing-6;
  }
}

.content {
  padding-bottom: int.$spacing-8;
}
