/* OBDX_NAVBAR_LAYOUT_ONLY_V1 — shared theme/ticker lives in site.css */
.exchange-navbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(18px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 16, 0.88);
  backdrop-filter: blur(18px);
}

.nav-brand {
  flex: 0 0 auto;
}

.site-navigation,
.nav-primary,
.nav-utility,
.nav-account {
  display: flex;
  align-items: center;
}

.site-navigation {
  min-width: 0;
  justify-content: flex-end;
  gap: clamp(15px, 2.4vw, 36px);
}

.nav-primary,
.nav-account {
  gap: 5px;
}

.nav-utility {
  gap: 14px;
  padding-left: clamp(12px, 2vw, 28px);
  border-left: 1px solid var(--line);
}

.nav-link,
.nav-register,
.nav-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  font: 750 11px/1 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link > span[aria-hidden="true"],
.nav-register > span[aria-hidden="true"],
.nav-signout > span[aria-hidden="true"] {
  color: var(--cyan);
  font: 800 15px/1 var(--mono);
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.nav-link.active {
  border-bottom-color: var(--acid);
}

#nav-account-label {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#markets,
#trade,
#live-funding-panel,
#account,
#admin-panel {
  scroll-margin-top: 88px;
}

.nav-register {
  color: var(--base);
  border-color: var(--acid);
  background: var(--acid);
  font-weight: 850;
}

.nav-register > span[aria-hidden="true"] {
  color: var(--base);
}

.nav-register:hover {
  background: #e3ff70;
}

.nav-signout {
  cursor: pointer;
}

.nav-signout:hover {
  color: var(--red);
  border-color: rgba(255, 107, 99, 0.28);
}

.nav-toggle {
  display: none;
  justify-self: end;
  width: 42px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 150ms ease, opacity 150ms ease;
}

.nav-toggle span + span {
  margin-top: 6px;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) {
  .nav-utility .paper-pill {
    display: none;
  }

  .site-navigation {
    gap: 13px;
  }

  .nav-link,
  .nav-register,
  .nav-signout {
    padding-inline: 8px;
  }
}

@media (max-width: 860px) {
  .exchange-navbar {
    grid-template-columns: auto auto;
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .site-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 12px 18px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 12, 0.985);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.35);
  }

  .exchange-navbar.nav-open .site-navigation {
    display: grid;
    gap: 10px;
  }

  .nav-primary,
  .nav-account {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-account {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-account#nav-account-user {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-utility {
    justify-content: center;
    min-height: 34px;
    padding: 0;
    border: 0;
  }

  .nav-link,
  .nav-register,
  .nav-signout {
    min-height: 44px;
    padding: 0 9px;
    border-color: var(--line);
  }
}

@media (max-width: 520px) {
  .nav-brand small {
    display: none;
  }

  .nav-primary,
  .nav-account,
  .nav-account#nav-account-user {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span {
    transition: none;
  }
}

/* OBDX_NAV_OBD_BRAND_LOGO_V1 */

.obdx-nav-obd-brand-logo-slot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: transparent !important;
  overflow: hidden !important;
  line-height: 0 !important;
}

.obdx-nav-obd-brand-logo {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .obdx-nav-obd-brand-logo-slot,
  .obdx-nav-obd-brand-logo {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
  }
}


/* OBDX_NAV_OBD_BRAND_LOGO_SIZE_V3 */

.obdx-nav-obd-brand-logo-slot,
.obdx-nav-obd-brand-logo {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
}

@media (max-width: 640px) {
  .obdx-nav-obd-brand-logo-slot,
  .obdx-nav-obd-brand-logo {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
  }
}

/* OBDX_OBEX_NAV_BRAND_FILL_V1 */
.exchange-navbar .nav-brand {
  gap: 12px;
  min-height: 0;
  line-height: 1;
}

.exchange-navbar .nav-brand > span:last-child {
  display: inline-block;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.exchange-navbar .nav-brand > span:last-child b {
  font-weight: 850;
}

@media (max-width: 640px) {
  .exchange-navbar .nav-brand > span:last-child {
    font-size: 22px;
  }
}

/* OBDX_OBIDOGE_NAV_THEME_V1 — visual-only navbar treatment */
.exchange-navbar {
  border-bottom-color: rgba(255,255,255,.14);
  /* Authoritative navbar background: matches the public sign-in page. */
  background: rgba(5,6,16,.88);
  box-shadow: 0 12px 42px rgba(0,0,0,.30);
  backdrop-filter: blur(18px) saturate(135%);
}
.nav-link,
.nav-register,
.nav-signout {
  border-radius: 12px;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease),
              transform .15s var(--ease), box-shadow .15s var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.055);
}
.nav-link:hover { transform: translateY(-1px); }
.nav-link.active {
  border-color: rgba(0,229,255,.28);
  box-shadow: inset 0 -2px 0 var(--glow1), 0 0 22px rgba(0,229,255,.055);
}
.nav-link > span[aria-hidden="true"],
.nav-register > span[aria-hidden="true"],
.nav-signout > span[aria-hidden="true"] {
  color: var(--glow1);
}
.nav-register {
  color: var(--text);
  border-color: rgba(0,229,255,.32);
  background: linear-gradient(180deg, rgba(0,229,255,.26), rgba(155,92,255,.20));
  box-shadow: 0 10px 28px rgba(155,92,255,.12);
}
.nav-register > span[aria-hidden="true"] { color: var(--text); }
.nav-register:hover {
  color: var(--text);
  border-color: rgba(0,229,255,.48);
  background: linear-gradient(180deg, rgba(0,229,255,.34), rgba(155,92,255,.26));
  transform: translateY(-1px);
}
.nav-toggle {
  border-radius: 12px;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
}
.nav-toggle:hover { border-color: rgba(0,229,255,.34); }

@media (prefers-reduced-motion: reduce) {
  .nav-link:hover,
  .nav-register:hover { transform: none; }
}
