/* mobile_pass/bottom_nav.css
   Compact app navigation:
   Rankings / Leaders / News / Watchlist / Reports, plus Upgrade for free accounts
*/

#bottomNav.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2px 68px 1px 6px;
  box-sizing: border-box;
  overflow: visible;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
  background: linear-gradient(0deg, rgba(4, 13, 17, .97) 0%, rgba(0, 3, 5, .985) 100%);
  border: 0;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .12);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  transform: translateY(1px);
  transition: background .28s ease;
  z-index: 60;
}

#bottomNav.bottom-nav .bottom-nav-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  overflow: visible;
  gap: 3px;
  box-sizing: border-box;
  padding: 3px 4px 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: rgba(246, 249, 251, .88);
  text-decoration: none;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: var(--tr-type-label-weight, 500);
  line-height: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color .18s ease;
}

#bottomNav.bottom-nav .bottom-nav-btn::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2px;
  left: 50%;
  width: min(61px, 76%);
  height: 39px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 38%, rgba(91, 235, 225, .16) 0%, rgba(40, 184, 191, .07) 46%, rgba(40, 184, 191, 0) 74%);
  transition: opacity .2s ease;
}

#bottomNav.bottom-nav .bottom-nav-btn svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  overflow: visible;
  stroke-width: 1.9;
}

/* One stroke family, including auth icons rebuilt by the shell. */
#bottomNav.bottom-nav .bottom-nav-btn svg :is(path, rect, circle, line, polyline, polygon) {
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bottomNav.bottom-nav .bottom-nav-btn span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  min-height: 12px;
  overflow: visible;
  padding: 0;
  line-height: 12px;
  font-weight: inherit;
  white-space: nowrap;
  text-overflow: clip;
}

#bottomNav.bottom-nav .bottom-nav-btn.active {
  color: #70e8df;
  background: transparent;
  text-shadow: none;
}

#bottomNav.bottom-nav .bottom-nav-btn.active svg {
  filter: none;
}

#bottomNav.bottom-nav .bottom-nav-btn.active::before {
  opacity: .55;
}

#bottomNav.bottom-nav .bottom-nav-btn:focus-visible {
  outline: 1px solid rgba(112, 232, 223, .7);
  outline-offset: -5px;
  border-radius: 12px;
}

#bottomNav.bottom-nav .bottom-nav-btn:active {
  transform: none !important;
  scale: none !important;
  animation: none !important;
}

#bottomNav.bottom-nav .bottom-nav-btn:hover,
#bottomNav.bottom-nav .bottom-nav-btn:hover svg,
#bottomNav.bottom-nav .bottom-nav-btn:hover span,
#bottomNav.bottom-nav .bottom-nav-btn:active svg,
#bottomNav.bottom-nav .bottom-nav-btn:active span {
  transform: none !important;
  scale: none !important;
  animation: none !important;
}

body.tr-nav-compact #bottomNav.bottom-nav {
  height: 52px;
  padding: 2px 68px 1px 6px;
}

body.tr-nav-compact #bottomNav.bottom-nav .bottom-nav-btn {
  gap: 3px;
  padding-top: 3px;
  padding-bottom: 2px;
  font-size: 10px;
}

body.tr-nav-compact #bottomNav.bottom-nav .bottom-nav-btn::before {
  top: 2px;
  width: min(61px, 76%);
  height: 39px;
}

body.tr-nav-compact #bottomNav.bottom-nav .bottom-nav-btn svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

@media (prefers-reduced-motion: reduce) {
  #bottomNav.bottom-nav,
  #bottomNav.bottom-nav .bottom-nav-btn {
    transition: none;
  }
}

/* Refined footer: reserve the original 78px wedge without covering any destination.
   Compact visuals retain full, nonoverlapping touch targets.
   The existing shell measures the legal bar and supplies the bottom offset. */
html body #bottomNav.bottom-nav,
html body.tr-nav-compact #bottomNav.bottom-nav {
  padding-left: calc(var(--tr-app-content-inset, 0px) + 6px);
  padding-right: calc(var(--tr-app-content-inset, 0px) + 78px);
  transform: none;
}
html body #bottomNav.bottom-nav .bottom-nav-btn {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 1px;
  color: #b9c8cf;
}
html body #bottomNav.bottom-nav .bottom-nav-btn.active { color: #70e8df; }
html body #bottomNav.bottom-nav #bottomUpgradeBtn { color: #a9cbdf; }
html body #bottomNav.bottom-nav #bottomUpgradeBtn.active { color: #70e8df; }
#bottomUpgradeBtn[hidden],
body[data-guest="1"] #bottomUpgradeBtn,
body:not([data-plan="free"]) #bottomUpgradeBtn { display: none !important; }

html body #menuToggle.triangle-wedge,
html body.tr-nav-compact #menuToggle.triangle-wedge {
  width: 78px;
  height: 78px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}
html body #menuToggle.triangle-wedge .gear-icon,
html body.tr-nav-compact #menuToggle.triangle-wedge .gear-icon {
  top: 70%;
  left: 70%;
  width: 26px;
  transform: translate(-50%, -50%);
}
#menuToggle:focus-visible { box-shadow: inset 0 0 0 2px #70e8df; }

/* Watchlists stays in the header. Full Platinum access uses the available
   fourth footer slot for My Reports; other account states keep their layout. */
body:not([data-guest="1"]) #bottomNav #bottomPrimaryBtn,
body:not([data-guest="1"]):not([data-platinum-access="1"]) #bottomNav #bottomSecondaryBtn { display: none !important; }
body:not([data-guest="1"])[data-platinum-access="1"] #bottomNav #bottomSecondaryBtn { display:flex !important; }
@media (max-width:360px) {
  /* Keep the complete caption at the shared 10px size on narrow phones. */
  body:not([data-guest="1"])[data-platinum-access="1"] #bottomNav.bottom-nav #bottomSecondaryBtn { min-width:66px; }
}

/* Fade gently from the diagonal shoulder into the dark footer. */
html:not([data-reading-theme="light"]) body #menuToggle.triangle-wedge,
html[data-reading-palette="dim"] body #menuToggle.triangle-wedge {
  background: linear-gradient(135deg, #1e3a40 50%, #102429 100%);
}

/* The larger Menu glyph uses the same apparent stroke as the 20px destinations. */
html body #menuToggle.triangle-wedge .gear-icon svg line {
  stroke-width: 1.5;
}
