/* =====================================================
   Music Player
   - 36px margin from walls (outer .music-wrap padding)
   - Timeline on top (4px tall: grey track, red fill)
   - 7 buttons evenly spread
   ===================================================== */
.music-wrap {
  padding: 0 20px;
}

.music-player {
  position: relative;
  width: 100%;
  padding: 16px 18px;
  border-radius: 40px;
  overflow: hidden;
}

.music-timeline {
  position: absolute;
  top: 0;
  left: 24px;     /* was 0 */
  right: 24px;    /* was 0 */
  height: 4px;
  cursor: pointer;
  touch-action: none;
}

.music-timeline-track {
  position: absolute;
  inset: 0;
  background: var(--color-grey);
}

.music-timeline-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--color-red);
  transition: width 0.1s linear;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  gap: 2px;
}

.mc-btn {
  width: 40px;
  height: 40px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.12s ease, background 0.15s ease;
  flex: 0 0 auto;
}

.mc-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mc-btn:hover { background: rgba(255, 255, 255, 0.08); }
.mc-btn:active { transform: scale(0.9); }

/* =====================================================
   Alati Mode
   ----------------------------------------------------
   During mangala_aalati / sandhya_aalati the music player
   hides all buttons except the center play (which acts
   as mute/unmute) and keeps the timeline visible.
   ===================================================== */
.music-controls.is-alati {
  justify-content: center;
}

.music-controls.is-alati .mc-btn {
  display: none;
}

.music-controls.is-alati .mc-btn.mc-play {
  display: flex;
  width: 48px;
  height: 48px;
}

/* Timeline colour in alati mode — warm gold fill instead of red
   since it represents the song's radio-style progress. */
.music-wrap.is-alati .music-timeline-fill {
  background: var(--color-yellow-light);
}

/* Hidden state (during pahuda — Lord sleeps) */
.music-wrap[hidden] {
  display: none;
}

/* =====================================================
   Music Meta Bar — song title + time remaining
   Sits just above the .music-player pill.
   ===================================================== */
.music-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 0 4px 8px;
}

.music-meta-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-offwhite);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.music-meta-sep {
  font-size: 13px;
  color: var(--color-offwhite);
  opacity: 0.4;
  flex-shrink: 0;
}

.music-meta-time {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-offwhite);
  opacity: 0.75;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* Meta bar text dims slightly in alati/lullaby — no seeking, radio feel */
.music-wrap.is-alati .music-meta-title,
.music-wrap.is-alati .music-meta-time,
.music-wrap.is-alati .music-meta-sep {
  opacity: 0.55;
}
