/* ═══════════════════════════════════════════════════════════════════════
   WebDBPro – Shared public-pages navigation styles  (nav.css)
   Used by: index.html, pricing.html, subscribe.html, terms.html,
            login.html, reset-password.html
   NOT used by: app-home.html, share.html, dashboard.html, database.html
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Top nav bar ──────────────────────────────────────────────────────── */
.wdbp-nav {
  background: rgba(13,17,23,0.93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
.wdbp-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

/* ── Desktop link strip ──────────────────────────────────────────────── */
.wdbp-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.wdbp-nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  padding: 0.3rem 0;
}
.wdbp-nav-links a:hover,
.wdbp-nav-links a.nav-active { color: var(--text); }

/* ── Desktop CTA area ────────────────────────────────────────────────── */
.wdbp-nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Small email label shown when logged in */
.wdbp-nav-user-email {
  font-size: 0.82rem;
  color: var(--text2);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Btn helpers ─────────────────────────────────────────────────────── */
.wdbp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.wdbp-btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.wdbp-btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.wdbp-btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.wdbp-btn-primary:hover { background: #79b8ff; }

/* ── Burger button (hidden on desktop) ──────────────────────────────── */
.wdbp-nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  padding: 6px 8px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.wdbp-nav-burger:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* ── Mobile overlay (backdrop behind drawer) ─────────────────────────── */
.wdbp-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.wdbp-nav-overlay.open { display: block; }

/* ── Mobile drawer ───────────────────────────────────────────────────── */
.wdbp-nav-drawer {
  /* Position & size */
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 106;
  width: min(80vw, 300px);

  /* Layout — flex column so links grow and CTA stays pinned at the bottom */
  display: flex;
  flex-direction: column;

  /* Appearance */
  background: var(--bg2);
  border-left: 1px solid var(--border);
  padding: 1rem;

  /* Slide in from the right */
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.wdbp-nav-drawer.open { transform: translateX(0); }

/* ── Drawer header (logo + close button) ────────────────────────────── */
.wdbp-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.wdbp-drawer-close {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  transition: color 0.15s;
}
.wdbp-drawer-close:hover { color: var(--text); }

/* ── Drawer link list ────────────────────────────────────────────────── */
.wdbp-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  /* Fill remaining vertical space so CTA is pushed to the bottom */
  flex: 1;
  overflow-y: auto;
}
.wdbp-drawer-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  display: block;
}
.wdbp-drawer-links a.nav-active { color: var(--accent); }
.wdbp-drawer-links a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* ── Drawer CTA (bottom-pinned buttons) ─────────────────────────────── */
.wdbp-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}

.wdbp-drawer-cta-email {
  font-size: 0.8rem;
  color: var(--text2);
  text-align: center;
  padding: 0.2rem 0;
  word-break: break-all;
}

/* Shared block-button base */
.wdbp-mob-login,
.wdbp-mob-signup,
.wdbp-mob-logout,
.wdbp-mob-applink {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}

.wdbp-mob-login {
  color: var(--text2);
  border: 1px solid var(--border);
  background: transparent;
}
.wdbp-mob-login:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.wdbp-mob-signup {
  background: var(--accent);
  color: #0d1117;
  border: none;
}
.wdbp-mob-signup:hover { background: #79b8ff; }

.wdbp-mob-applink {
  background: var(--accent);
  color: #0d1117;
  border: none;
}
.wdbp-mob-applink:hover { background: #79b8ff; }

.wdbp-mob-logout {
  color: var(--text2);
  border: 1px solid var(--border);
  background: transparent;
}
.wdbp-mob-logout:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

/* ── Responsive breakpoint ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .wdbp-nav-links { display: none; }
  .wdbp-nav-cta   { display: none; }
  .wdbp-nav-burger { display: flex; }
}
