/* Volume slider, hints, filter tabs, focus visibility, reduced motion.
 *
 * Layer 12 of the stylesheet. ORDER IS SIGNIFICANT: this file's rules
 * are overridden by every later layer and override every earlier one, exactly as
 * when they were one file. See docs/frontend-architecture.md. */

/* VOLUME SLIDER */
#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  outline: none;
  margin: 12px 0;
  cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00ff99;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,255,153,.5);
  border: 2px solid #050b10;
  transition: transform .15s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

#volumeSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00ff99;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,255,153,.5);
  border: 2px solid #050b10;
}

#volumeSlider::-moz-range-track {
  background: rgba(255,255,255,.08);
  height: 6px;
  border-radius: 99px;
}

#volumeLabel {
  display: inline-block;
  margin-left: 12px;
  color: #00ff99;
  font-weight: 700;
  font-size: 13px;
}

.first-visit-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,255,153,.95);
  color: #050b10;
  padding: 14px 22px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 30px rgba(0,255,153,.5), 0 10px 30px rgba(0,0,0,.4);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: hintBounce 1.5s ease-in-out infinite;
  cursor: pointer;
}

.first-visit-hint:hover {
  background: rgba(0,255,153,1);
}

.first-visit-hint .close-hint {
  font-size: 18px;
  opacity: .6;
  margin-left: 6px;
  background: transparent;
  border: none;
  color: #050b10;
  cursor: pointer;
  padding: 0 4px;
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

@media (max-width: 600px) {
  .first-visit-hint {
    bottom: 16px;
    font-size: 12px;
    padding: 12px 18px;
  }
}

/* Mobile-only Coin Details section */
.mobile-only {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-only {
    display: block;
  }

  /* Hide right panel on mobile since details show inline */
  .right-panel {
    display: none;
  }
}

/* Mobile fixes for filter tabs and leaderboard overflow */
@media (max-width: 600px) {
  .main-card,
  .sidebar,
  .right-panel {
    padding: 16px 14px !important;
  }
  /* Top Movers filter tabs — make them scroll horizontally */
  #coinMonitor > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  
  #coinMonitor > div:first-child > div {
    overflow-x: auto;
    /* A flex item defaults to min-width:auto, so it cannot shrink below its
       own content — this strip stayed 289px wide inside a 248px card and
       pushed the whole PAGE sideways at 320px instead of scrolling inside
       itself, which is what overflow-x above was for. */
    min-width: 0;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  
  #coinMonitor > div:first-child .filter-tab {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 10px;
  }
  
  /* Signal Leaderboard — tighten grid for mobile */
  #leaderboard > div {
    grid-template-columns: 28px 28px 1fr 80px auto !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  
/* Compress score bar on mobile, don't hide */
  #leaderboard > div > div:nth-child(4) {
    min-width: 80px !important;
  }
  
  #leaderboard > div > div:nth-child(4) > div:first-child {
    height: 4px !important;
  }
  
  /* Make price column tighter */
  #leaderboard > div > div:last-child {
    min-width: auto !important;
    font-size: 13px !important;
  }
}


/* Accessibility: visible keyboard focus */
.nav-item:focus-visible,
.filter-tab:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #00ff99;
  outline-offset: 2px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
