/* ==========================================================
   21st.dev MINIMALIST GLOBAL NAVIGATION STYLES
   ========================================================== */

:root {
  --nav-bg: #000000;
  --nav-border: #27272a; /* zinc-800 */
  --nav-text: #f4f4f5;   /* zinc-100 */
  --nav-muted: #a1a1aa;  /* zinc-400 */
  --nav-hover: #18181b;  /* zinc-900 */
  --nav-accent: #f59e0b; /* amber-500 */
}

/* Global Navbar */
.global-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #000000 !important;
  border-bottom: 1px solid #27272a !important;
  height: 56px;
  display: flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.global-navbar-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.global-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-hamburger-btn {
  background: transparent;
  border: 1px solid #27272a;
  color: #f4f4f5;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  padding: 0;
  line-height: 1;
}

.global-hamburger-btn:hover {
  background-color: #18181b;
  border-color: #3f3f46;
}

.global-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.global-brand .brand-dot {
  color: #71717a;
}

/* Desktop Links */
.global-desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-nav-link {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}

.global-nav-link:hover {
  color: #ffffff;
  background-color: #18181b;
}

.global-nav-link.active {
  color: #ffffff;
}

.global-ebook-pill {
  color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.global-ebook-pill:hover {
  background-color: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Drawer & Overlay */
#drawerOverlay,
.global-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#drawerOverlay.show,
#drawerOverlay.open,
.global-drawer-overlay.show,
.global-drawer-overlay.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#drawerMenu,
.global-drawer-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -320px;
  width: 290px;
  max-width: 85vw;
  z-index: 10001;
  background-color: #000000 !important;
  border-right: 1px solid #27272a;
  transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  box-shadow: 20px 0 40px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  box-sizing: border-box;
}

#drawerMenu.open,
#drawerMenu.show,
.global-drawer-menu.open,
.global-drawer-menu.show {
  left: 0 !important;
  transform: none !important;
}

.global-drawer-header,
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #27272a;
  margin-bottom: 16px;
}

.global-drawer-brand,
.drawer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none;
}

.global-drawer-close-btn,
.drawer-close-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-drawer-close-btn:hover,
.drawer-close-btn:hover {
  color: #ffffff;
}

.global-drawer-nav,
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.global-drawer-link,
.drawer-nav a,
.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #a1a1aa !important;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}

.global-drawer-link:hover,
.drawer-nav a:hover,
.drawer-nav-link:hover {
  color: #ffffff !important;
  background-color: #18181b !important;
}

.global-drawer-link.drawer-ebook-highlight,
.drawer-nav a.drawer-ebook-highlight,
.drawer-nav-link.drawer-ebook-highlight {
  color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  font-weight: 600;
}

.global-drawer-link.drawer-ebook-highlight:hover,
.drawer-nav a.drawer-ebook-highlight:hover,
.drawer-nav-link.drawer-ebook-highlight:hover {
  background-color: rgba(245, 158, 11, 0.2) !important;
}

.global-drawer-divider,
.drawer-divider {
  border: 0;
  border-top: 1px solid #27272a;
  margin: 12px 0;
  width: 100%;
}

@media (max-width: 768px) {
  .global-desktop-nav,
  .topbar-desktop-nav {
    display: none !important;
  }
}
