/* =========================================================================
   Valor Listen Bar — WSJ-style "Listen to this section" component
   ========================================================================= */
.listen-bar {
  --lb-gold: #E8B66A;
  --lb-gold-deep: #C8A042;
  --lb-cream: #F4ECD8;
  --lb-bg-dark: rgba(12, 18, 24, 0.75);
  --lb-bg-paper: rgba(20, 26, 34, 0.06);

  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 12px 18px;
  border: 1px solid rgba(200, 160, 66, 0.35);
  border-radius: 999px;
  background: var(--lb-bg-dark);
  color: var(--lb-cream);
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-sizing: border-box;
}
/* Light-section variant (auto-detected by JS via data-theme) */
.listen-bar[data-theme="light"] {
  background: rgba(255, 255, 255, 0.75);
  color: #1a1f26;
  border-color: rgba(200, 160, 66, 0.5);
}
.listen-bar[data-theme="light"] .listen-bar__label { color: #6b5d3b; }
.listen-bar[data-theme="light"] .listen-bar__time  { color: rgba(26, 31, 38, 0.6); }
.listen-bar[data-theme="light"] .listen-bar__track { background: rgba(200, 160, 66, 0.15); }

.listen-bar:hover, .listen-bar:focus-within {
  border-color: var(--lb-gold);
  box-shadow: 0 6px 24px rgba(200, 160, 66, 0.15);
}
.listen-bar.is-playing {
  border-color: var(--lb-gold);
  box-shadow: 0 6px 28px rgba(200, 160, 66, 0.25);
}

/* Play/pause button */
.listen-bar__play {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--lb-gold);
  background: transparent;
  color: var(--lb-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 180ms ease, transform 100ms ease;
}
.listen-bar__play:hover { background: rgba(232, 182, 106, 0.15); }
.listen-bar__play:active { transform: scale(0.94); }
.listen-bar__play:focus-visible {
  outline: 2px solid var(--lb-gold);
  outline-offset: 3px;
}
.listen-bar__play svg { width: 14px; height: 14px; fill: currentColor; }
.listen-bar__play .icon-pause { display: none; }
.listen-bar.is-playing .listen-bar__play .icon-play { display: none; }
.listen-bar.is-playing .listen-bar__play .icon-pause { display: block; }

/* Label + eyebrow */
.listen-bar__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.listen-bar__label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--lb-gold-deep);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.listen-bar__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress track */
.listen-bar__track {
  flex: 0 0 120px;
  height: 3px;
  border-radius: 3px;
  background: rgba(232, 182, 106, 0.18);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.listen-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--lb-gold), var(--lb-gold-deep));
  transition: width 100ms linear;
}

/* Time readout */
.listen-bar__time {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: rgba(244, 236, 216, 0.65);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: right;
}

/* Mobile — collapse to essentials */
@media (max-width: 560px) {
  .listen-bar {
    gap: 10px;
    padding: 10px 12px;
    margin: 0 auto 24px;
  }
  .listen-bar__text { min-width: 0; flex: 1 1 auto; }
  .listen-bar__label {
    font-size: 9px;
    letter-spacing: 0.22em;
    white-space: nowrap;
  }
  .listen-bar__title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Hide track on mobile — keep time */
  .listen-bar__track { display: none; }
  .listen-bar__time { min-width: 38px; font-size: 11px; }
}
