/* Lite CDN navigation shell. This file is the single final override for the
   header and profile menu; legacy component rules remain isolated below it. */
body[data-theme] .site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  overflow: visible;
  padding: 0;
  background: #0f6cbd;
  border-bottom: 1px solid #004578;
}

body[data-theme] .site-header .container {
  width: 100%;
  max-width: 1440px;
  padding: 0 16px;
}

body[data-theme] .site-nav {
  display: grid;
  min-height: 52px;
  align-items: stretch;
  padding: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 52px;
}

body[data-theme] .site-nav__brand {
  display: inline-flex;
  min-width: 142px;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 0;
  color: #fff !important;
  border-right: 1px solid rgba(255, 255, 255, .18);
  text-decoration: none;
  grid-column: 1;
  grid-row: 1;
}

body[data-theme] .site-nav__brand > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  overflow: hidden;
  background: #fff;
  border-radius: 2px;
  place-items: center;
}

body[data-theme] .site-nav__brand strong {
  display: inline;
  overflow: hidden;
  font-size: .94rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme] .site-nav__actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  grid-column: 2;
  grid-row: 1;
}

body[data-theme] .site-nav__actions::-webkit-scrollbar { display: none; }

body[data-theme] .site-nav__actions > :where(a, .dropdown) {
  min-width: 0;
  flex: 0 0 auto;
}

body[data-theme] .site-nav__actions > .dropdown {
  display: flex;
  align-items: stretch;
}

body[data-theme] .site-nav__actions .dropdown > .profile-button {
  width: auto;
  height: 100%;
}

body[data-theme] :where(.nav-item, .profile-button, .auth-link) {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: rgba(255, 255, 255, .94) !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

body[data-theme] :where(.nav-item, .profile-button, .auth-link):hover,
body[data-theme] :where(.nav-item--active, .dropdown--open .profile-button) {
  color: #fff !important;
  background: #115ea3 !important;
}

body[data-theme] :where(.nav-item, .profile-button, .auth-link) .fa {
  width: 16px;
  margin: 0;
  text-align: center;
  font-size: 15px;
}

body[data-theme] .profile-button .fa-angle-down {
  margin-left: 2px;
  transition: transform .15s ease;
}

body[data-theme] .dropdown--open .profile-button .fa-angle-down {
  transform: rotate(180deg);
}

body[data-theme] .language-switch {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  color: rgba(255, 255, 255, .5);
  border-left: 1px solid rgba(255, 255, 255, .18);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  grid-column: 3;
  grid-row: 1;
}

body[data-theme] .language-switch a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
}

body[data-theme] .language-switch a:hover,
body[data-theme] .language-switch a[aria-current="true"] { color: #fff; }

body[data-theme] .dropdown-content.dropdown-content--open {
  display: block;
  z-index: 2000;
  width: 240px;
  min-width: 0;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  padding: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}

body[data-theme] .dropdown-content :where(a, button) {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--text-color);
  background: transparent;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  font: inherit;
  font-size: .88rem;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}

body[data-theme] .dropdown-content form { margin: 0; }
body[data-theme] .dropdown-content :where(a, button):hover,
body[data-theme] .dropdown-content :where(a, button):focus-visible {
  color: var(--text-color);
  background: var(--surface-hover);
}

body[data-theme] .dropdown-content .fa {
  width: 16px;
  flex: 0 0 16px;
  margin: 0;
  text-align: center;
}

@media (max-width: 1099px) {
  body[data-theme] .site-header .container { max-width: none; padding: 0; }
  body[data-theme] .site-nav {
    min-height: 96px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 44px 52px;
  }
  body[data-theme] .site-nav__brand {
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    border-right: 0;
    grid-column: 1;
    grid-row: 1;
  }
  body[data-theme] .site-nav__brand > span { width: 28px; height: 28px; flex-basis: 28px; }
  body[data-theme] .language-switch {
    min-height: 44px;
    grid-column: 2;
    grid-row: 1;
  }
  body[data-theme] .site-nav__actions {
    justify-content: flex-start;
    border-top: 1px solid rgba(255, 255, 255, .16);
    grid-column: 1 / -1;
    grid-row: 2;
  }
  body[data-theme] :where(.nav-item, .profile-button, .auth-link) {
    min-height: 52px;
    padding: 0 13px;
  }
}

@media (max-width: 575px) {
  body[data-theme] .site-header { position: sticky !important; }
  body[data-theme] .site-nav__brand { min-width: 0; }
  body[data-theme] .site-nav__brand strong { display: inline; }
  body[data-theme] .site-nav__actions > :where(a, .dropdown) { min-width: 104px; }
  body[data-theme] .site-nav__actions :where(.nav-item, .profile-button) {
    width: 100%;
    padding: 0 10px;
  }
}
