/* Vendor directory nav v2 (2026-09-06). SOURCE file: copy of the NAV V2 block in
   dnsai.com/template/style/nav-fixes.css with html[data-theme=light] selectors added (this app stamps
   data-theme). Deploy as a NEW filename nav-v2-<ver>.css and point includes/layout.php at it — Cloudflare
   ignores ?v= under /vendor-directory/. Keep in sync with nav-fixes.css. */
/* ========================================================================
   NAV V2 (2026-09-06) — wide wordmark + sun/moon theme toggle.
   Scoped to .nav-v2 so the 15 per-family nav stylesheets cannot collide.
   Theme keys: html[data-dnsai-theme="light"] (set pre-paint by theme-init.php)
   and body.light-mode (what every family stylesheet already keys on).
   ======================================================================== */
:root {
  --nav-height: 72px;
  --nav-wordmark-h: 22px;
  --nav-wordmark-h-md: 18px;
  --nav-wordmark-h-sm: 18px;
}
.nav-v2 { gap: 0; }
.nav-v2 .nav-brand { display: flex; align-items: center; flex-shrink: 0; min-width: 0; }
.nav-v2 .nav-brand-link {
  display: flex; align-items: center; text-decoration: none;
  padding: 0 !important; margin: 0 !important; line-height: 0; opacity: 1; transition: opacity .2s ease;
}
.nav-v2 .nav-brand-link:hover { opacity: .85; }
.nav-v2 .nav-wordmark { display: none; line-height: 0; }
.nav-v2 .nav-wordmark img {
  height: var(--nav-wordmark-h) !important; width: auto !important; max-width: none !important; display: block; filter: none;
}
.nav-v2 .nav-wordmark--dark { display: block; }
body.light-mode .nav-v2 .nav-wordmark--dark,
html[data-dnsai-theme="light"] .nav-v2 .nav-wordmark--dark,
html[data-theme="light"] .nav-v2 .nav-wordmark--dark { display: none; }
body.light-mode .nav-v2 .nav-wordmark--light,
html[data-dnsai-theme="light"] .nav-v2 .nav-wordmark--light,
html[data-theme="light"] .nav-v2 .nav-wordmark--light { display: block; }

/* Links: drop the legacy 50px right margin (main.css) — the wordmark's width comes from here */
/* physical resets FIRST (families set margin-left/right), logical values LAST so they win in both LTR and RTL */
.nav-v2 .nav-links { margin-left: 0 !important; margin-right: 0 !important; margin-inline-start: 20px !important; margin-inline-end: 0 !important; }
.nav-v2 .nav-search { flex: 1 1 auto; min-width: 0; margin-left: 0 !important; margin-right: 0 !important; margin-inline-start: 16px !important; margin-inline-end: 12px !important; }

/* Right-hand action cluster: theme toggle + hamburger */
.nav-v2 .nav-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto !important; flex-shrink: 0; }
.nav-v2 .nav-actions .menu-icon { margin-left: 0 !important; position: static !important; }

body.light-mode .nav-v2 .nav-actions .menu-icon,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .menu-icon,
html[data-theme="light"] .nav-v2 .nav-actions .menu-icon { color: #1a1a1a !important; text-shadow: none !important; }

/* Sun/moon toggle (markup: template/includes/theme-toggle.php).
   Box properties are !important: several page stylesheets ship `body.<page> button {width:35%; margin:15px; …}`
   and inline `button {padding … !important}` rules (domain-manager, dns-explorer clones) that outrank a class. */
.nav-v2 .nav-actions .theme-toggle {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 32px !important; height: 32px !important; min-width: 0 !important; max-width: none !important;
  border-radius: 50% !important; padding: 0 !important; margin: 0 !important; font-size: 0 !important; line-height: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important; color: #d5dde6 !important;
  position: relative; top: 4px;  /* sits 4px lower to align with the nav links (owner request 2026-09-06) */
  cursor: pointer; flex-shrink: 0; -webkit-tap-highlight-color: transparent;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.nav-v2 .nav-actions .theme-toggle svg { width: 17px !important; height: 17px !important; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.nav-v2 .nav-actions .theme-toggle .icon-sun { display: none; }
.nav-v2 .nav-actions .theme-toggle:hover { color: #26c4ff !important; }
/* Page stylesheets ship generic button:hover / button:active gradients — never let them paint the toggle */
.nav-v2 .nav-actions .theme-toggle:hover, .nav-v2 .nav-actions .theme-toggle:focus, .nav-v2 .nav-actions .theme-toggle:active {
  background: transparent !important; border: 0 !important; box-shadow: none !important; transform: none !important;
}
.nav-v2 .nav-actions .theme-toggle:focus-visible { outline: 2px solid #26c4ff; outline-offset: 2px; }
body.light-mode .nav-v2 .nav-actions .theme-toggle,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .theme-toggle,
html[data-theme="light"] .nav-v2 .nav-actions .theme-toggle { color: #3b4756 !important; }
body.light-mode .nav-v2 .nav-actions .theme-toggle .icon-sun,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .theme-toggle .icon-sun,
html[data-theme="light"] .nav-v2 .nav-actions .theme-toggle .icon-sun { display: block; }
body.light-mode .nav-v2 .nav-actions .theme-toggle .icon-moon,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .theme-toggle .icon-moon,
html[data-theme="light"] .nav-v2 .nav-actions .theme-toggle .icon-moon { display: none; }
body.light-mode .nav-v2 .nav-actions .theme-toggle:hover,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .theme-toggle:hover,
html[data-theme="light"] .nav-v2 .nav-actions .theme-toggle:hover { color: #0054ff !important; }
body.light-mode .nav-v2 .nav-actions .theme-toggle:focus-visible,
html[data-dnsai-theme="light"] .nav-v2 .nav-actions .theme-toggle:focus-visible,
html[data-theme="light"] .nav-v2 .nav-actions .theme-toggle:focus-visible { outline-color: #0054ff; }

/* Breakpoints: wordmark shrinks, and links/search leave at <=900px (was 768px) so the
   769-900px band never overflows the hamburger off-canvas. */
@media (max-width: 1024px) {
  .nav-v2 .nav-wordmark img { height: var(--nav-wordmark-h-md) !important; }
}
@media (max-width: 900px) {
  .nav-v2 .nav-links { display: none !important; }
  .nav-v2 .nav-search { display: none !important; }
}
@media (max-width: 768px) {
  /* Mobile: icon sat askew — 2px higher and 3px further right than the desktop offset (owner, 2026-09-06) */
  .nav-v2 .nav-actions .theme-toggle { top: 2px; left: 3px; }
}
@media (max-width: 600px) {
  .nav-v2 .nav-wordmark img { height: var(--nav-wordmark-h-sm) !important; }
  .nav-v2 .nav-actions .theme-toggle { width: 30px !important; height: 30px !important; }
}
@media (hover: none) and (pointer: coarse) {
  .nav-v2 .nav-actions .theme-toggle { min-width: 44px !important; min-height: 44px !important; }
}

/* Vendor directory light mode: the Utilities dropdown label was left white by Shared_Vendor_Landscape.css */
html[data-theme="light"] .nav-v2 .nav-links .nav-dropdown-toggle,
html[data-dnsai-theme="light"] .nav-v2 .nav-links .nav-dropdown-toggle,
body.light-mode .nav-v2 .nav-links .nav-dropdown-toggle { color: #1a1a1a !important; }
