@layer ods-molecules {
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    opacity: var(--ods-semantic-opacity-backdrop);
    background-color: var(--ods-semantic-color-surface-backdrop);
  }
  .drawer-content:not([hidden]) {
    --ods-drawer-padding-horizontal: calc(var(--ods-semantic-size-space-inset-inline) * 2);
    --ods-drawer-padding-vertical: calc(var(--ods-semantic-size-space-inset-block) * 2);
    --ods-drawer-z-index: var(--ods-semantic-z-index-drawer);
    display: block;
    position: fixed;
    inset-block: auto;
    inset-inline: auto;
    z-index: var(--ods-drawer-z-index);
    margin: 0;
    outline: none;
    border: none;
    box-shadow: var(--ods-semantic-shadow-overlay);
    background: var(--ods-semantic-color-surface-overlay);
    padding: var(--ods-drawer-padding-vertical) var(--ods-drawer-padding-horizontal);
    width: auto;
    overflow: auto;
    opacity: 0;
    pointer-events: none;
  }
  .drawer-content:not([hidden])[data-state=open] {
    transition: opacity var(--ods-semantic-motion-duration-instant);
    opacity: 1;
    pointer-events: auto;
  }
  .drawer-content:not([hidden])[data-state=closed] {
    transition: opacity var(--ods-semantic-motion-duration-instant) linear var(--ods-semantic-motion-duration-slow);
    opacity: 0;
    pointer-events: none;
  }
  .drawer-content:not([hidden]).drawer-content--bottom {
    right: 0;
    bottom: 0;
    left: 0;
    animation: drawer-open-bottom var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
    width: 100%;
    height: 320px;
    max-height: calc(100% - var(--ods-semantic-size-space-inset-block) * 6);
  }
  @keyframes drawer-open-bottom {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
  @keyframes drawer-close-bottom {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(100%);
    }
  }
  .drawer-content:not([hidden]).drawer-content--bottom[data-state=closed] {
    animation: drawer-close-bottom var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
  }
  .drawer-content:not([hidden]).drawer-content--left {
    top: 0;
    bottom: 0;
    left: 0;
    animation: drawer-open-left var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
    width: 320px;
    max-width: calc(100% - var(--ods-semantic-size-space-inset-inline) * 6);
    height: 100%;
  }
  @keyframes drawer-open-left {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translateX(0);
    }
  }
  @keyframes drawer-close-left {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-100%);
    }
  }
  .drawer-content:not([hidden]).drawer-content--left[data-state=closed] {
    animation: drawer-close-left var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
  }
  .drawer-content:not([hidden]).drawer-content--right {
    top: 0;
    right: 0;
    bottom: 0;
    animation: drawer-open-right var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
    width: 320px;
    max-width: calc(100% - var(--ods-semantic-size-space-inset-inline) * 6);
    height: 100%;
  }
  @keyframes drawer-open-right {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }
  @keyframes drawer-close-right {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(100%);
    }
  }
  .drawer-content:not([hidden]).drawer-content--right[data-state=closed] {
    animation: drawer-close-right var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
  }
  .drawer-content:not([hidden]).drawer-content--top {
    top: 0;
    right: 0;
    left: 0;
    animation: drawer-open-top var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
    width: 100%;
    height: 320px;
    max-height: calc(100% - var(--ods-semantic-size-space-inset-block) * 6);
  }
  @keyframes drawer-open-top {
    from {
      transform: translateY(-100%);
    }
    to {
      transform: translateY(0);
    }
  }
  @keyframes drawer-close-top {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(-100%);
    }
  }
  .drawer-content:not([hidden]).drawer-content--top[data-state=closed] {
    animation: drawer-close-top var(--ods-semantic-motion-duration-slow) var(--ods-semantic-motion-easing);
  }
}
