/* Shared TreasuryX navigation. One file for every page. */

/* Navigation bar */
.tx-nav {
  width: 100%;
  position: relative;
  z-index: 1000;
  background: var(--tx-nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--tx-font);
  line-height: normal;
  color: var(--tx-nav-link);
}

.tx-nav,
.tx-nav * {
  box-sizing: border-box;
}

.tx-nav-inner {
  width: min(1200px, calc(100% - 40px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.tx-logo {
  text-decoration: none;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.tx-logo-main {
  color: var(--tx-nav-text);
}

.tx-logo-x {
  color: var(--tx-accent);
}

/* Desktop links */
.tx-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tx-nav-link {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: none;
  background: none;
  color: var(--tx-nav-link);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.tx-nav-link.tx-current,
.tx-nav-dropdown.open > .tx-dropdown-btn,
.tx-nav-dropdown.tx-current > .tx-dropdown-btn {
  color: var(--tx-nav-text);
}

a.tx-nav-link::before,
a.tx-nav-link::after {
  content: none;
}

.tx-dropdown-btn {
  outline: none;
  cursor: default;
}

.tx-chevron {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--tx-accent);
  box-shadow: 0 0 8px rgb(from var(--tx-accent) r g b / 0.8);
  opacity: 0;
  flex: none;
  transition: opacity 0.18s ease;
}

.tx-nav-dropdown:hover > .tx-dropdown-btn .tx-chevron {
  opacity: 1;
}

.tx-nav-dropdown {
  position: relative;
}

/* Dropdown menus */
.tx-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  width: 255px;
  padding: 8px;
  background: var(--tx-menu-bg);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.tx-nav-dropdown.open .tx-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tx-dropdown-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.tx-dropdown-menu a:hover,
.tx-dropdown-menu a.tx-current {
  background: rgba(255, 255, 255, 0.06);
}

.tx-dropdown-menu a.tx-current {
  background: rgb(from var(--tx-accent) r g b / 0.12);
}

.tx-menu-title {
  display: block;
  color: var(--tx-nav-text);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.tx-dropdown-menu a.tx-current .tx-menu-title {
  color: var(--tx-menu-current);
}

.tx-menu-description {
  display: block;
  color: var(--tx-menu-muted);
  font-size: 11px;
  line-height: 1.4;
}

.tx-nav-link:focus-visible,
.tx-dropdown-menu a:focus-visible,
.tx-mobile-toggle:focus-visible,
.tx-mobile-section:focus-visible,
.tx-mobile-menu a:focus-visible {
  outline: 2px solid rgb(from var(--tx-accent) r g b / 0.75);
  outline-offset: 2px;
}

/* Mobile menu */
.tx-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 9px;
}

.tx-mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--tx-nav-text);
  border-radius: 2px;
  transition: 0.2s ease;
}

.tx-mobile-menu {
  display: none;
  width: 100%;
  padding: 8px 20px 18px;
  background: var(--tx-mobile-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tx-mobile-menu > a,
.tx-mobile-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  color: var(--tx-mobile-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.tx-mobile-section span {
  color: var(--tx-mobile-sign);
  font-size: 18px;
}

.tx-mobile-submenu {
  display: none;
  padding: 0 0 8px 14px;
}

.tx-mobile-submenu.open {
  display: block;
}

.tx-mobile-submenu a {
  display: block;
  padding: 9px 0;
  color: var(--tx-mobile-link);
  font-size: 13px;
  text-decoration: none;
}

.tx-mobile-submenu a:hover,
.tx-mobile-menu > a.tx-current,
.tx-mobile-submenu a.tx-current,
.tx-mobile-section.tx-current {
  color: var(--tx-nav-text);
}

/* Responsive/mobile styles */
@media (max-width: 800px) {
  .tx-nav-inner {
    height: 62px;
  }

  .tx-nav-links {
    display: none;
  }

  .tx-mobile-toggle {
    display: block;
  }

  .tx-mobile-menu.open {
    display: block;
  }
}

@media (max-width: 450px) {
  .tx-nav-inner {
    width: calc(100% - 28px);
  }

  .tx-logo {
    font-size: 19px;
  }
}
