/* Independent header dropdowns — do not rely on TradingView React bundles */

.tv-header,
.tv-header__inner,
.tv-header__middle-wrapper,
.tv-header__middle-content,
.tv-header__area--menu,
.tv-header__main-menu,
.tv-header__main-menu-item {
  overflow: visible !important;
}

.tv-header__inner {
  z-index: 200;
}

.tv-header__main-menu-item {
  position: relative;
}

.tv-header__main-menu-item.has-dropdown > a .tv-header__main-menu-item__chevron {
  opacity: 1 !important;
  position: static;
  height: 18px;
  width: 18px;
  margin-left: 2px;
  flex-shrink: 0;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.tv-header__main-menu-item.has-dropdown.is-open > a .tv-header__main-menu-item__chevron,
.tv-header__main-menu-item.has-dropdown:hover > a .tv-header__main-menu-item__chevron {
  transform: rotate(180deg);
}

.tv-header__main-menu-item.has-dropdown.is-open > a {
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 8px);
  left: 8px;
  min-width: 260px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 300;
}

.tv-header__main-menu-item.has-dropdown.is-open > .nav-dropdown {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .tv-header__main-menu-item.has-dropdown:hover > .nav-dropdown {
    display: block;
  }
}

.tv-header__main-menu-item:last-child .nav-dropdown {
  left: auto;
  right: 8px;
}

.nav-dropdown__section {
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #787b86;
}

.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  color: #d1d4dc !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  background: transparent;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
  background: #2a2e39;
  color: #fff !important;
}

.js-nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  padding: 0;
  border: none;
  border-radius: 32px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.js-nav-hamburger:hover,
.js-nav-hamburger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.js-nav-hamburger svg {
  display: block;
}

@media (max-width: 1100px) {
  .js-nav-hamburger {
    display: flex;
  }

  .tv-header__area--menu {
    position: static;
  }

  .tv-header__main-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    max-height: calc(100vh - 64px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 8px 12px 20px;
    background: #0c1018;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    z-index: 250;
  }

  .tv-header__main-menu.is-open {
    display: flex;
  }

  .tv-header__main-menu-item {
    width: 100%;
    display: block;
  }

  .tv-header__main-menu-item > a {
    margin: 4px 0;
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    min-width: 0;
    margin: 0 8px 8px;
    box-shadow: none;
  }
}
