:host,
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
    :host,
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }:host,
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
    :host,
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }/** Typography */
:host {
  /**
   * @prop --size: Size of the drawer. Defaults to 25rem.
   * @prop --min-size: Minimum size of the drawer (only relevant when `resizable` is set). Defaults to 25rem.
   * @prop --max-size: Maximum size of the drawer (only relevant when `resizable` is set). Defaults to 50%.
   * @prop --panel-background: Background color of the panel. Defaults to var(--nano-color-neutral-75).
   * @prop --panel-shadow: Shadow of the panel. Defaults to var(--nano-shadow-l3).
   * @prop --scrim-color: Color of the scrim. Defaults to var(--nano-overlay-background-color).
   * @prop --header-button-color: Color of the header button. Defaults to var(--nano-color-neutral-75).
   * @prop --footer-background: Background color of the footer. Defaults to var(--nano-color-neutral-75).
   * @prop --header-background: Background color of the header. Defaults to var(--nano-color-neutral-75).
   * @prop --header-spacing: Spacing of the header. Defaults to var(--nano-spacing-l).
   * @prop --body-spacing: Spacing of the body. Defaults to var(--nano-spacing-l).
   * @prop --footer-spacing: Spacing of the footer. Defaults to var(--nano-spacing-l).
   */
  --size: 25rem;
  --min-size: 25rem;
  --max-size: 50%;
  --panel-background: var(--nano-color-surface-300);
  --panel-shadow: var(--nano-shadow-l3);
  --scrim-color: var(--nano-overlay-background-color);
  --header-button-color: var(--nano-color-primary-1200);
  --header-button-size: 1.375rem;
  --footer-background: var(--panel-background);
  --header-background: var(--panel-background);
  --header-spacing: var(--nano-spacing-l) var(--nano-spacing-l1-default);
  --body-spacing: var(--nano-spacing-l1-default);
  --footer-spacing: var(--nano-spacing-l) var(--nano-spacing-l1-default);
  --dir: 1;
}

:host([placement=top]),
:host([placement=bottom]) {
  --max-size: 80%;
}

:host(:dir(rtl)) {
  --dir: -1;
}

:host-context([dir=rtl]) {
  --dir: -1;
}

.drawer {
  inset-block-start: 0;
  inset-inline-start: 0;
  pointer-events: none;
  overflow: hidden;
  border: none;
  inline-size: 100%;
  block-size: 100%;
  color: unset;
  background-color: unset;
}
.drawer::backdrop {
  display: none;
}
.drawer--contained {
  position: absolute;
  z-index: initial;
}
.drawer--fixed {
  position: fixed;
  z-index: var(--nano-z-index-modal);
}

.drawer__panel {
  position: absolute;
  max-inline-size: 100%;
  max-block-size: 100%;
  background-color: var(--panel-background);
  box-shadow: var(--panel-shadow);
  pointer-events: all;
  transition: var(--nano-transition-fast) opacity, var(--nano-transition-fast) transform;
  display: flex;
}
.drawer--top .drawer__panel, .drawer--bottom .drawer__panel {
  flex-direction: column;
}
@media (forced-colors: active) {
  .drawer__panel {
    border: solid 1px var(--nano-color-base-1000);
  }
}
.drawer__panel:focus {
  outline: none;
}
.drawer--nodismiss .drawer__panel {
  animation: cannotClose 0.25s ease-in-out 1;
}
@keyframes cannotClose {
  0% {
    scale: 1;
  }
  50% {
    scale: 1.08;
  }
  100% {
    scale: 1;
  }
}
.drawer--top .drawer__panel {
  inset-block: 0 auto;
  inset-inline: 0 auto;
  inline-size: 100%;
  block-size: var(--size);
  opacity: 0;
  transform: translateY(-100%);
}
.drawer--bottom .drawer__panel {
  inset-block: auto 0;
  inset-inline: 0 auto;
  inline-size: 100%;
  block-size: var(--size);
  opacity: 0;
  transform: translateY(100%);
}
.drawer--top.drawer--open .drawer__panel, .drawer--bottom.drawer--open .drawer__panel {
  opacity: 1;
  transform: translateY(0);
}
.drawer--start .drawer__panel {
  inset-block: 0 auto;
  inset-inline: 0 auto;
  inline-size: var(--size);
  block-size: 100%;
  opacity: 0;
  transform: translateX(calc(var(--dir) * -100%));
}
.drawer--end .drawer__panel {
  inset-block: 0 auto;
  inset-inline: auto 0;
  inline-size: var(--size);
  block-size: 100%;
  opacity: 0;
  transform: translateX(calc(var(--dir) * 100%));
}
.drawer--start.drawer--open .drawer__panel, .drawer--end.drawer--open .drawer__panel {
  opacity: 1;
  transform: translateX(0);
}

.drawer__resize-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: var(--nano-z-index-dropdown);
  color: var(--nano-color-primary-1200);
  background-color: var(--nano-color-neutral-75);
}
.drawer__resize-handle:focus {
  outline: none;
}
.drawer__resize-handle:focus-visible {
  background-color: var(--nano-focus-ring-color);
}
.drawer__resize-handle:active {
  color: var(--nano-color-primary-800);
}
.drawer--top .drawer__resize-handle, .drawer--bottom .drawer__resize-handle {
  cursor: row-resize;
  inset-inline: 0;
}
.drawer--end .drawer__resize-handle, .drawer--start .drawer__resize-handle {
  cursor: col-resize;
  inset-block: 0;
}
.drawer--end .drawer__resize-handle {
  inset-inline-start: 0;
}
.drawer--start .drawer__resize-handle {
  inset-inline-end: 0;
}
.drawer--top .drawer__resize-handle {
  inset-block-end: 0;
}
.drawer--bottom .drawer__resize-handle {
  inset-block-start: 0;
}

.drawer__header {
  inline-size: 100%;
  display: flex;
  background-color: var(--header-background);
  align-items: center;
  padding: var(--header-spacing);
}
[stuck] .drawer__header {
  box-shadow: var(--nano-shadow-l0);
}

.drawer__title {
  flex: 1 1 auto;
  margin: 0;
  font-weight: var(--nano-font-weight-normal);
  font-size: var(--nano-font-size-xl);
  line-height: var(--nano-line-height-denser);
  text-wrap: balance;
}

.drawer__header-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--nano-spacing-sm);
  color: var(--header-button-color);
  inset-inline-end: calc(var(--nano-spacing-l1-default) / 2 * -1);
  position: relative;
}
.drawer__header-actions .drawer__close,
.drawer__header-actions ::slotted(.nano-icon-button) {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  font-size: var(--header-button-size);
}

.drawer__main {
  display: flex;
  flex-direction: column;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.drawer__body {
  display: block;
  flex: 1 1 auto;
  padding: var(--body-spacing);
  padding-block: 0 var(--body-spacing);
  padding-inline: var(--body-spacing);
}
.drawer:not(.drawer--has-header) .drawer__body {
  padding-block-start: var(--body-spacing);
}

.drawer__footer {
  inline-size: 100%;
  text-align: end;
  padding: var(--footer-spacing);
  background: var(--footer-background);
  inset-block-start: 1px;
  position: relative;
  border-block-start: 1px solid var(--nano-color-neutral-300);
  gap: var(--nano-spacing-md);
  display: inline-flex;
}
.drawer:not(.drawer--has-footer) .drawer__footer {
  display: none;
}

.drawer__overlay {
  display: block;
  position: fixed;
  inset: 0;
  background-color: var(--scrim-color);
  pointer-events: all;
  opacity: 0;
  transition: var(--nano-transition-fast) opacity;
}
.drawer--open .drawer__overlay {
  opacity: 1;
}
.drawer--contained .drawer__overlay {
  display: none;
}