.hs-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--hs-z-drawer);
  background: rgba(15, 23, 42, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--hs-transition-normal) var(--hs-ease),
    visibility 0s linear var(--hs-transition-normal);
}

.hs-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.hs-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: calc(var(--hs-z-drawer) + 1);
  display: flex;
  flex-direction: column;
  width: min(26rem, 100vw);
  background: var(--hs-color-surface);
  box-shadow: var(--hs-shadow-drawer);
  transform: translateX(100%);
  transition: transform var(--hs-transition-normal) var(--hs-ease-emphasized);
}

/* inset-inline-end auto-flips for RTL, but transform's axis is physical -
   without this, an RTL drawer would still fly off toward the right even
   though it's now anchored on the left. */
:root[dir="rtl"] .hs-drawer {
  transform: translateX(-100%);
}

.hs-drawer-backdrop.is-open .hs-drawer {
  transform: translateX(0);
}

.hs-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-16);
  padding: var(--hs-space-20) var(--hs-space-24);
  border-bottom: 1px solid var(--hs-color-border);
}

.hs-drawer__title {
  font-size: var(--hs-font-size-h5);
  font-weight: var(--hs-font-weight-semibold);
}

.hs-drawer__close {
  display: inline-flex;
  padding: var(--hs-space-8);
  border-radius: var(--hs-radius-md);
  color: var(--hs-color-text-muted);
}
.hs-drawer__close:hover {
  background: var(--hs-color-surface-sunken);
  color: var(--hs-color-text);
}

.hs-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--hs-space-24);
}

.hs-drawer__footer {
  padding: var(--hs-space-20) var(--hs-space-24);
  border-top: 1px solid var(--hs-color-border);
}
