/* Drawer Organism - SPACING CONTRACT: Fixed positioning, no margins */
/* Below the environment banner off prod (--banner-height, layout.css; 0 on prod): the banner
   sits above every drawer and hid its title and close button on stage (TLP-1236). */
.drawer-overlay {
  position: fixed;
  top: var(--banner-height, 0);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  margin: 0;
}

/* A non-modal drawer floats over a screen that stays usable: the overlay lets
   clicks through and only the drawer itself takes them (Drawer.build modal: false). */
.drawer-overlay--passive {
  pointer-events: none;
}
.drawer-overlay--passive .drawer {
  pointer-events: auto;
}
.drawer-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-px);
  min-width: 0;
}
.drawer-eyebrow {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.drawer {
  position: absolute;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  margin: 0;
  animation: drawer-slide-in var(--duration-300) var(--easing-out);
}

.drawer-right {
  top: 0;
  right: 0;
  bottom: 0;
}

.drawer-left {
  top: 0;
  left: 0;
  bottom: 0;
}

.drawer-top {
  top: 0;
  left: 0;
  right: 0;
}

.drawer-bottom {
  bottom: 0;
  left: 0;
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

@keyframes drawer-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer-left {
  animation-name: drawer-slide-in-left;
}

@keyframes drawer-slide-in-left {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}
