/* ==========================================================================
   components.css — WINAMP 2026
   Clean, modern dark buttons and controls. Readable labels everywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Transport Buttons
   -------------------------------------------------------------------------- */
.transport-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.transport-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 4px 10px;
  min-width: 38px;
  height: 36px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

/* SVG transport icons — readable size */
.transport-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  pointer-events: none;
}

.transport-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 8px var(--accent-glow-wide);
}

.transport-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.transport-btn:active {
  background: var(--bg-deep);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Play button — accent emphasis */
.transport-btn.play-btn {
  min-width: 50px;
  border-color: var(--accent-glow);
  color: var(--accent);
}

.transport-btn.play-btn .play-icon {
  fill: var(--accent);
}

.transport-btn.play-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Active playback state */
.transport-btn.play-btn.is-playing {
  color: var(--accent);
  background: linear-gradient(180deg, var(--accent-bg-dim), var(--bg-deep));
  border-color: var(--accent-glow-strong);
  box-shadow:
    0 0 8px var(--accent-glow),
    0 0 20px var(--accent-glow-wide),
    inset 0 0 10px var(--accent-bg);
}

.transport-spacer {
  width: 12px;
}

/* --------------------------------------------------------------------------
   Feature Bar
   -------------------------------------------------------------------------- */
.feature-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  margin-top: 4px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.feature-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.feature-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.feature-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  pointer-events: none;
}

.feature-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.feature-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Active feature button — accent green with underline */
.feature-btn.is-active {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.feature-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Custom Range Slider (Horizontal)
   -------------------------------------------------------------------------- */
.styled-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

/* WebKit track */
.styled-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Firefox track */
.styled-slider::-moz-range-track {
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  border: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* WebKit thumb */
.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0e0e8;
  border: 2px solid var(--bg-deep);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  margin-top: -5px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}

.styled-slider::-webkit-slider-thumb:hover {
  box-shadow:
    0 0 4px rgba(0, 0, 0, 0.4),
    0 0 8px var(--accent-glow);
}

/* Firefox thumb */
.styled-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0e0e8;
  border: 2px solid var(--bg-deep);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}

.styled-slider::-moz-range-thumb:hover {
  box-shadow:
    0 0 4px rgba(0, 0, 0, 0.4),
    0 0 8px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   Slider Row / Group — with readable labels and values
   -------------------------------------------------------------------------- */
.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.slider-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 26px;
  text-align: right;
}

.slider-track-wrapper {
  flex: 1;
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 22px;
  text-align: left;
  text-shadow: 0 0 6px var(--accent-glow-wide);
}

/* --------------------------------------------------------------------------
   Seek Bar
   -------------------------------------------------------------------------- */
.seek-bar-container {
  position: relative;
  padding: 6px 12px 8px;
}

.waveform-canvas {
  display: block;
  width: 100%;
  height: 22px;
  pointer-events: none;
}

.seek-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.seek-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-glow);
  pointer-events: none;
}

.seek-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: #e0e0e8;
  border: 2px solid var(--bg-deep);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: box-shadow var(--transition-fast);
}

.seek-bar:hover .seek-thumb {
  box-shadow:
    0 0 4px rgba(0, 0, 0, 0.5),
    0 0 10px var(--accent-glow);
}

.seek-time {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Controls Section override
   -------------------------------------------------------------------------- */
.controls-section {
  padding: 8px 0 0;
}

/* --------------------------------------------------------------------------
   FX Panel
   -------------------------------------------------------------------------- */
.fx-panel {
  background: var(--bg-panel);
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}

.fx-header {
  margin-bottom: 10px;
}

.fx-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow-wide);
}

.fx-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  cursor: pointer;
  position: relative;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.fx-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.fx-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.fx-btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent-glow);
  box-shadow: 0 0 8px var(--accent-glow-wide);
  text-shadow: 0 0 6px var(--accent-glow-wide);
}

.fx-btn[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 25%;
  right: 25%;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent-glow);
  pointer-events: none;
}

.fx-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.fx-wear-control {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-left: 82px;
}

.fx-wear-control label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Custom Tooltip — replaces native title tooltip on hover and long-press
   -------------------------------------------------------------------------- */
.wa-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 11000;
  pointer-events: none;
  background: rgba(10, 10, 15, 0.96);
  color: var(--accent, #26ff40);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 10px;
  border: 1px solid var(--border, #2a2a35);
  border-radius: 4px;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.5),
    0 0 8px rgba(38, 255, 64, 0.15);
  text-shadow: 0 0 6px rgba(38, 255, 64, 0.4);
  white-space: nowrap;
  max-width: calc(100vw - 16px);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.wa-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Drop Overlay
   -------------------------------------------------------------------------- */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  pointer-events: none;
}

.drop-overlay[hidden] {
  display: none;
}

.drop-overlay-content {
  text-align: center;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  text-shadow:
    0 0 10px var(--accent-glow),
    0 0 30px var(--accent-glow-wide);
  pointer-events: none;
}

.drop-overlay-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Drop prompt in empty playlist
   -------------------------------------------------------------------------- */
.drop-prompt {
  text-align: center;
  padding: 12px 0;
}

.drop-prompt-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: block;
  color: var(--accent);
  opacity: 0.5;
}

.drop-prompt p {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 4px 0;
}

.drop-prompt-sub {
  font-size: 11px !important;
  font-weight: 400 !important;
  color: var(--text-dim) !important;
}

.drop-prompt-formats {
  font-size: 10px !important;
  color: var(--text-dimmer) !important;
  letter-spacing: 0.5px;
  margin-top: 8px !important;
}
