/* ============================================================
   GLOBAL AUDIO PLAYER
   ============================================================ */

/* body padding managed by JS _updateBodyPadding() */

.player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  background: #0f2035;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.player--hidden { display: none; }
.player__icon--hidden { display: none; }

/* ── Shared sub-components ── */

.player__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.player__title {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.player__title:hover { color: var(--gold-light); }
.player__speaker {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.player__play-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  color: #0f2035;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, transform 0.1s;
  flex-shrink: 0;
}
.player__play-btn:hover { background: var(--gold-light); transform: scale(1.05); }
.player__play-btn svg { width: 16px; height: 16px; }
.player__play-btn--sm { width: 34px; height: 34px; }
.player__play-btn--sm svg { width: 13px; height: 13px; }

.player__skip-btn {
  display: flex; align-items: center; gap: 2px;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700;
  padding: 0.3rem;
  border-radius: var(--radius);
  transition: color 0.1s, background 0.1s;
}
.player__skip-btn:hover { color: white; background: rgba(255,255,255,0.08); }
.player__skip-btn svg { width: 15px; height: 15px; }

.player__progress {
  flex: 1; width: 100%;
  height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer; outline: none;
}
.player__progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: white; cursor: pointer;
  transition: transform 0.1s;
}
.player__progress:hover::-webkit-slider-thumb { transform: scale(1.25); }
.player__progress::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%; background: white; border: none; cursor: pointer;
}

/* Speed picker popover */
.speed-picker { position: relative; flex-shrink: 0; }
.speed-picker__btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}
.speed-picker__btn:hover { background: rgba(255,255,255,0.14); color: white; }
.speed-picker__menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1c2e;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  min-width: 68px;
  z-index: 10;
}
.speed-picker__option {
  display: block; width: 100%;
  padding: 0.45rem 0.75rem;
  background: none; border: none;
  color: rgba(255,255,255,0.65);
  font-family: var(--font-sans); font-size: 0.82rem;
  text-align: center; cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.speed-picker__option:hover { background: rgba(255,255,255,0.08); color: white; }
.speed-picker__option--active { color: var(--gold-light); font-weight: 600; }

.player__close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.1s, background 0.1s;
  flex-shrink: 0;
}
.player__close-btn:hover { color: white; background: rgba(255,255,255,0.08); }
.player__close-btn svg { width: 15px; height: 15px; }

/* ── DESKTOP ROW (>1000px) ── */

.player__desktop-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1.5rem;
  height: 72px;
}
.player__desktop-row .player__info { width: 220px; flex-shrink: 0; }
.player__controls { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.player__secondary {
  flex: 1; display: flex; align-items: center; gap: 0.75rem; min-width: 0;
}
.player__progress-area {
  flex: 1; display: flex; align-items: center; gap: 0.6rem; min-width: 0;
}
.player__time {
  font-size: 0.72rem; color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}

/* ── COMPACT MINI (≤1000px, collapsed) ── */

.player__compact-mini { display: none; }
.player__mini-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.12);
}
.player__mini-progress__fill {
  height: 100%; width: 0%;
  background: var(--gold-light);
  transition: width 0.25s linear;
}
.player__expand-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: color 0.1s, background 0.1s;
  flex-shrink: 0;
}
.player__expand-btn:hover { color: white; background: rgba(255,255,255,0.08); }
.player__expand-btn svg { width: 16px; height: 16px; }

/* ── COMPACT EXPANDED (≤1000px, expanded) ── */

.player__compact-expanded { display: none; }

.player__exp-info {
  margin-bottom: 1rem;
}
.player__exp-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: white;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.player__exp-title:hover { color: var(--gold-light); }
.player__exp-speaker {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  display: block;
}

.player__exp-scrubber { margin-bottom: 1.25rem; }
.player__exp-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
  margin-top: 0.5rem;
}

.player__exp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.player__exp-controls .player__play-btn { width: 48px; height: 48px; }
.player__exp-controls .player__play-btn svg { width: 20px; height: 20px; }
.player__exp-controls .player__skip-btn { font-size: 0.78rem; }
.player__exp-controls .player__skip-btn svg { width: 17px; height: 17px; }

.player__exp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.875rem;
}
.player__exp-stop,
.player__exp-collapse {
  display: flex; align-items: center; gap: 0.4rem;
  background: none; border: none;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.3rem 0.5rem;
  transition: color 0.1s, background 0.1s;
}
.player__exp-stop:hover,
.player__exp-collapse:hover { color: white; background: rgba(255,255,255,0.08); }
.player__exp-stop svg,
.player__exp-collapse svg { width: 14px; height: 14px; }

/* Infinite scroll sentinel */
.infinite-scroll-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}
.infinite-scroll-sentinel::after {
  content: '';
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: sentinel-spin 0.8s linear infinite;
}
@keyframes sentinel-spin { to { transform: rotate(360deg); } }

