.gs-drawer-trigger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gs-drawer-overlay[hidden] {
  display: none;
}

.gs-drawer-overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: flex;
  background: rgb(20 23 26 / 40%);
}

.gs-drawer-overlay--right { justify-content: flex-end; }
.gs-drawer-overlay--left { justify-content: flex-start; }
.gs-drawer-overlay--top { align-items: flex-start; }
.gs-drawer-overlay--bottom { align-items: flex-end; }

.gs-drawer {
  display: flex;
  flex-direction: column;
  width: min(500px, calc(100vw - 32px));
  height: 100%;
  overflow: hidden;
  background: var(--gs-neutral-9);
}

.gs-drawer--top,
.gs-drawer--bottom {
  width: 100%;
  height: min(500px, calc(100vh - 32px));
}

.gs-drawer__header {
  display: flex;
  flex: 0 0 56px;
  align-items: center;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 16px;
  border-bottom: 1px solid var(--gs-neutral-7);
}

.gs-drawer__title {
  margin: 0;
  color: var(--gs-text-secondary);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.gs-drawer__close {
  flex: 0 0 32px;
  margin-left: auto;
  --button-color: var(--gs-neutral-3);
}

.gs-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 16px;
  overflow: auto;
  color: var(--gs-text-primary);
  font-size: 14px;
  line-height: 22px;
}

.gs-drawer__body > p { margin: 0; }

.gs-drawer__placeholder {
  display: grid;
  min-height: 160px;
  margin-top: 16px;
  padding: 16px;
  place-items: center;
  color: var(--gs-text-tertiary);
  text-align: center;
  background: var(--gs-neutral-8);
  border: 1px dashed var(--gs-neutral-6);
  border-radius: var(--gs-radius-md);
}

.gs-drawer__footer {
  display: flex;
  flex: 0 0 64px;
  align-items: center;
  box-sizing: border-box;
  min-height: 64px;
  padding: 16px;
  border-top: 1px solid var(--gs-neutral-7);
}

.gs-drawer__actions {
  display: flex;
  gap: 8px;
}

.gs-drawer__footer--end .gs-drawer__actions { margin-left: auto; }
.gs-drawer__actions .gs-button { min-width: 64px; }

@media (max-width: 640px) {
  .gs-drawer { width: min(500px, calc(100vw - 16px)); }
  .gs-drawer--top,
  .gs-drawer--bottom { height: min(500px, calc(100vh - 16px)); }
  .gs-drawer__body { padding: 16px; }
}
