/* ============================================================
   GLOBAL DRAWER - Styles
   With slide-in AND slide-out animations
   ============================================================ */

.global-drawer-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.global-drawer-panel {
  width: 460px;
  max-width: 90vw;
  background: var(--nh-drawer-bg, #ffffff);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(30px);
  border: 1px solid rgb(28, 30, 33);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
}

/* Closing animation */
.global-drawer-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
}

.global-drawer-backdrop.is-closing .global-drawer-panel {
  animation: slideOutRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

/* Header */
.global-drawer-header {
  padding: 24px;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.global-drawer-title-section {
  flex: 1;
  min-width: 0;
}

#global-drawer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--nh-text, #FFF);
}

#global-drawer-subtitle {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--nh-text-soft, #6b7280);
}

.global-drawer-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--nh-text-soft, #6b7280);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.global-drawer-close-btn:hover {
  background: var(--nh-panel-bg, #f3f4f6);
  color: var(--nh-text, #111827);
}

/* Tabs - NH Tabs UI (matches nh-ui-kit.js) */
.global-drawer-tabs {
  padding: 0 24px;
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
  display: flex;
  overflow-x: auto;
}

.nh-tab-list {
  display: flex;
  position: relative;
  gap: 0;
  width: 100%;
}

.nh-tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--nh-accent, #3b82f6);
  transition: transform 0.3s ease, width 0.3s ease;
  pointer-events: none;
}

.nh-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--nh-text-soft, #9ca3af);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nh-tab:hover {
  color: var(--nh-text, #d1d5db);
}

.nh-tab.is-active {
  color: var(--nh-accent, #3b82f6);
}

/* Content */
.global-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Footer */
.global-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--nh-border, #e5e7eb);
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  .global-drawer-panel {
    width: 100%;
    max-width: 100%;
  }
}