/* =========================================================================
   Valor Listen Bar — quiet, translucent, WSJ-style
   Blends into whatever section it lives on. Half the visual weight of v1.
   ========================================================================= */
.listen-bar {
  --lb-gold: #C8A042;
  --lb-gold-soft: rgba(200, 160, 66, 0.55);
  --lb-cream: #F4ECD8;

  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(200, 160, 66, 0.18);
  border-radius: 999px;
  background: transparent;
  color: currentColor;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: border-color 200ms ease, background 200ms ease;
  box-sizing: border-box;
  opacity: 0.85;
}

/* Auto-adapts to section background — no explicit theme needed most of the time */
.listen-bar[data-theme="light"] {
  color: #3a3226;
  border-color: rgba(120, 90, 30, 0.18);
}
.listen-bar[data-theme="dark"] {
  color: rgba(244, 236, 216, 0.85);
  border-color: rgba(200, 160, 66, 0.22);
}

.listen-bar:hover,
.listen-bar:focus-within {
  opacity: 1;
  border-color: var(--lb-gold-soft);
  background: rgba(200, 160, 66, 0.05);
}
.listen-bar.is-playing {
  opacity: 1;
  border-color: var(--lb-gold);
  background: rgba(200, 160, 66, 0.06);
}

/* Play/pause button — smaller, filled circle */
.listen-bar__play {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--lb-gold-soft);
  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, border-color 180ms ease;
}
.listen-bar__play:hover {
  background: rgba(200, 160, 66, 0.12);
  border-color: var(--lb-gold);
}
.listen-bar__play:active { transform: scale(0.92); }
.listen-bar__play:focus-visible {
  outline: 2px solid var(--lb-gold);
  outline-offset: 2px;
}
.listen-bar__play svg { width: 10px; height: 10px; 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; }

/* Text block — condensed, one visual row */
.listen-bar__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.2;
}
.listen-bar__label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--lb-gold);
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.75;
}
.listen-bar__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 12px;
  font-style: italic;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* Progress track — thin, subtle */
.listen-bar__track {
  flex: 0 0 60px;
  height: 2px;
  border-radius: 2px;
  background: rgba(200, 160, 66, 0.14);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.listen-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--lb-gold);
  transition: width 100ms linear;
}

/* Time readout */
.listen-bar__time {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: currentColor;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

/* Mobile — even tighter */
/* Give consecutive listen bars breathing room */
.listen-bar-wrap + .listen-bar-wrap { margin-top: 14px !important; }

@media (max-width: 560px) {
  .listen-bar {
    gap: 8px;
    padding: 5px 10px 5px 5px;
    margin: 0 auto 12px;
    max-width: 100%;
  }
  .listen-bar__play {
    width: 22px;
    height: 22px;
  }
  .listen-bar__play svg { width: 9px; height: 9px; }
  .listen-bar__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .listen-bar__label {
    font-size: 8px;
    letter-spacing: 0.2em;
  }
  .listen-bar__title {
    font-size: 11px;
    max-width: 100%;
  }
  .listen-bar__track { display: none; }
  .listen-bar__time {
    font-size: 9px;
    min-width: 28px;
  }
}
