/* Drawer - right-anchored side panel. Portal-mounted. */

.drawer__backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--color-backdrop-drawer);
}

.drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-width, 384px);
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-page);
  border-left: var(--border-width) solid var(--color-border);
  z-index: var(--z-modal);
  animation: drawer-slide-in var(--duration-base) var(--ease-out);
}

@keyframes drawer-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: var(--border-width) solid var(--color-border);
}

.drawer__title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

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

.drawer__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
}
