@use '../assets/scss/variables' as *;

.ntq-app-header {
  position: relative;
  z-index: 1200;
  width: 100%;
  overflow: visible;
  // Fully opaque: hover / dropdown must not trigger page backdrop-filter repaints below.
  background-color: var(--ntq-ink, #060612);
  border-bottom: 1px solid var(--ntq-white-12);
}

.ntq-app-header__toolbar {
  min-height: $ntq-header-height;
  display: block;
  width: 100%;
  overflow: visible;
}

.ntq-app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: $ntq-header-height;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  overflow: visible;
}

.ntq-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;

  &:hover {
    text-decoration: none;
  }
}

.ntq-brand__logo {
  width: auto;
  height: 50px;
  object-fit: contain;
  display: block;
}

.ntq-brand__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

// 与 new-tea 官网 .site-brand .site-name a 一致（紫 → 青 → 绿渐变字标）
.ntq-brand__name {
  display: inline-block;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  line-height: 1;
  letter-spacing: -0.1em;
  text-transform: uppercase;
  background: var(--ntq-brand-text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--ntq-brand-text-glow);

  &.MuiTypography-root {
    background: var(--ntq-brand-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    -webkit-text-fill-color: transparent;
  }
}

.ntq-brand__version {
  color: var(--ntq-text-muted);
  line-height: 1;
}

.ntq-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  overflow: visible;
}

.ntq-nav-btn {
  height: $ntq-header-height;
  border-radius: 0 !important; // override MUI global button radius
  border: none;
  background: transparent;
  color: var(--ntq-text);
  transition: background 180ms ease, color 180ms ease;
  padding-left: 18px !important;
  padding-right: 18px !important;
  min-width: 0 !important;

  &:hover {
    background: var(--ntq-white-06);
    color: var(--ntq-text);
  }

  &:active {
    background: rgba(255, 255, 255, 0.08);
  }
}

.ntq-nav-btn.is-active {
  color: var(--ntq-cyan);
  background: rgba(255, 255, 255, 0.06);

  &:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ntq-cyan);
  }
}

.ntq-nav-btn__caret {
  margin-left: 6px;
  font-size: 0.65rem;
  opacity: 0.75;
}

.ntq-nav-btn__caret-icon {
  margin-left: 6px;
  transition: transform 160ms ease;
}

.ntq-nav-btn--dropdown.is-open .ntq-nav-btn__caret-icon {
  transform: rotate(90deg);
}

.ntq-nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.ntq-nav-dropdown-popper {
  z-index: 1300;
}

.ntq-nav-dropdown__panel {
  min-width: 160px;
  padding: 4px 0;
  overflow: visible !important;
  background-color: rgba(12, 12, 28, 0.98) !important;
  border: 1px solid var(--ntq-white-12) !important;
  border-radius: var(--ntq-radius, 5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  /* 按钮与面板之间的 hover 桥，避免鼠标移入菜单时误触发关闭 */
  &::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
  }
}

.ntq-nav-dropdown__item {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ntq-text);
  text-decoration: none;

  &:hover {
    background: var(--ntq-white-06);
    text-decoration: none;
  }

  &.is-selected {
    background: rgba(34, 211, 238, 0.12);
    color: var(--ntq-cyan);
  }
}

