/* The shared marketing navbar (partials/navbar.html) is a blue bar on every page. The partial
   links this file itself, after blog-nav.css, which already makes the navbar readable on a
   dark bar (white links, a white plate behind the logo, a CSS caret, the sticky header); this
   file swaps navy for blue and fixes what the blue bar needs. It loads after each page's own
   stylesheets, so a page's older navbar colours cannot win. The !important flags match the
   theme rules being overridden. */
nav.navbar-fixed.dark,
nav.navbar-fixed.dark.no-background,
nav.navbar-fixed.dark.sticked { background: #1600ff !important; }
nav.navbar-fixed.dark .dropdown-menu { background: #fff !important; }

/* Hover and current link: pale lilac reads on the blue (the blog's teal does not). */
nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li > a:hover,
nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li > a:focus-visible,
nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li.active > a,
nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li > a.nav-link-active,
nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li > a[aria-current="page"] { color: #d6d2ff !important; }

/* "Create account": the theme's blue gradient button disappears on the blue bar; make it white. */
nav.navbar.validnavs.navbar-fixed.dark .attr-right .btn.btn-primary {
  border-color: #fff !important;
  background: #fff !important;
  color: #1600ff !important;
  text-shadow: none !important;
}
nav.navbar.validnavs.navbar-fixed.dark .attr-right .btn.btn-primary:hover,
nav.navbar.validnavs.navbar-fixed.dark .attr-right .btn.btn-primary:focus-visible { background: #e5e3ff !important; border-color: #e5e3ff !important; }

/* Phones and tablets: the theme floats the logo (position:absolute) over a 35px bar, which was
   invisible on a white bar but leaves the logo hanging out of a blue one. Keep it in the row. */
@media (max-width: 991.98px) {
  nav.navbar-fixed.dark > div { padding-top: 8px !important; padding-bottom: 8px !important; }
  nav.navbar-fixed.dark .navbar-brand { position: static !important; transform: none !important; margin: 0 !important; }
}

/* Signed-in email and Log out: white on the blue bar, whatever tone the navbar asked for. */
nav.navbar-fixed.dark .attr-right .iai-nav-account,
nav.navbar-fixed.dark #navbar-menu .iai-nav-account { color: #fff; }

/* Keep the full row on one line up to 1700px: signed-in staff see an extra "Admin" link, which
   otherwise wraps to a second row and covers what sits under the bar. */
@media (min-width: 1440px) and (max-width: 1699.98px) {
  nav.navbar-fixed.dark #navbar-menu > ul.navbar-nav > li > a { padding-left: 7px !important; padding-right: 7px !important; font-size: 14.5px !important; }
  nav.navbar-fixed.dark .attr-right .iai-nav-account .iai-nav-account__email { max-width: 150px; }
}

/* ── Pages with navbar colours of their own ─────────────────────────────── */
/* The packages catalogue restyles this navbar as a white bar with dark links
   (business_plan/css/catalogue.css). Same selectors, loaded later, so blue wins. */
.iai-catalogue-shell--nav nav.navbar.validnavs { border-bottom: 0 !important; background: #1600ff !important; }
.iai-catalogue-shell--nav nav.navbar.validnavs #navbar-menu > ul.nav > li > a { color: #fff !important; }
.iai-catalogue-shell--nav nav.navbar.validnavs #navbar-menu > ul.nav > li > a:hover,
.iai-catalogue-shell--nav nav.navbar.validnavs #navbar-menu > ul.nav > li > a.nav-link-active { color: #d6d2ff !important; }
/* The staff-only "AI Studio" link on the blog is dark sky blue on a white bar. */
nav.navbar.validnavs.navbar-fixed.dark .attr-right .nav-link.ai-studio-navlink,
nav.navbar.validnavs.navbar-fixed.dark .attr-right .nav-link.ai-studio-navlink i { border-color: rgba(255, 255, 255, .65) !important; background: transparent !important; color: #fff !important; }
