/* ── Cullah global sticky player ────────────────────────────────────
   Brand colors: deep teal panel, brushed gold accent, off-white text.
   z-index 60 — sits below modals (lightboxes z>=100) but above content.
   Hidden by default; JS removes [hidden] when a track is loaded. */

.cs-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(10, 24, 32, 0.97);
  color: #EDF1F0;
  border-top: 1px solid rgba(169, 136, 65, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.45);
  font-family: "Roboto", system-ui, sans-serif;
  animation: cs-player-slide-in 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cs-player[hidden] { display: none; }

@keyframes cs-player-slide-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Play / pause */
.cs-player-toggle {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: #A98841;
  color: #0A1820;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 120ms ease;
}
.cs-player-toggle:hover { background: #C9A661; transform: scale(1.05); }
.cs-player-toggle svg { width: 22px; height: 22px; display: block; }
.cs-player .cs-player-icon-pause { display: none; }
.cs-player.is-playing .cs-player-icon-play { display: none; }
.cs-player.is-playing .cs-player-icon-pause { display: block; }

/* Cover */
.cs-player-cover {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: block;
  border-radius: 3px;
  overflow: hidden;
  background: #1a3038;
}
.cs-player-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cs-player-cover-img:not([src]) { display: none; }

/* Meta (title + album) */
.cs-player-meta {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-player-title {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #EDF1F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.cs-player-title:hover { color: #C9A661; }
.cs-player-album {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A98841;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-player-album-link { color: inherit; text-decoration: none; }
.cs-player-album-link:hover { color: #C9A661; }

/* Progress (clickable for seek) */
.cs-player-progress {
  flex: 1 1 auto;
  min-width: 100px;
  height: 6px;
  background: rgba(237, 241, 240, 0.14);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.cs-player-progress-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #A98841 0%, #C9A661 100%);
  transition: width 120ms linear;
}
.cs-player-progress:hover .cs-player-progress-bar { background: #C9A661; }

/* Time */
.cs-player-time {
  flex: 0 0 auto;
  font-family: "Roboto Mono", monospace;
  font-size: 0.78rem;
  color: rgba(237, 241, 240, 0.7);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cs-player-time-sep { margin: 0 4px; opacity: 0.4; }

/* Prev/next — bigger and more obvious. !important to override any theme
   button reset that was killing visibility. */
button.cs-player-nav {
  flex: 0 0 auto !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(169, 136, 65, 0.45) !important;
  border-radius: 50% !important;
  background: rgba(237, 241, 240, 0.08) !important;
  color: #EDF1F0 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
  -webkit-appearance: none;
  appearance: none;
}
button.cs-player-nav:hover {
  background: #A98841 !important;
  color: #0A1820 !important;
  border-color: #A98841 !important;
  transform: scale(1.05);
}
button.cs-player-nav:disabled {
  opacity: 0.45 !important;
  cursor: default;
  background: transparent !important;
  border-color: rgba(237, 241, 240, 0.18) !important;
}
button.cs-player-nav:disabled:hover { transform: none; }
button.cs-player-nav svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  fill: currentColor !important;
  pointer-events: none;
}

/* Close */
.cs-player-close {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(237, 241, 240, 0.55);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: color 160ms ease, background 160ms ease;
}
.cs-player-close:hover { background: rgba(237, 241, 240, 0.08); color: #EDF1F0; }

/* Page-bottom padding so CTAs don't get covered */
body.cs-player-active { padding-bottom: 80px; }

/* Track-row play buttons (album page + anywhere with [data-cs-play]).
   Bulletproof: explicit padding/color, !important on icon dimensions to
   override any theme button reset. */
button.cs-track-play {
  flex: 0 0 auto;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #8B6B34 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #8B6B34 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}
button.cs-track-play:hover {
  background: #8B6B34 !important;
  color: #fff !important;
  border-color: #8B6B34 !important;
  transform: scale(1.08);
}
button.cs-track-play.is-current { background: #A98841 !important; color: #fff !important; border-color: #A98841 !important; }
button.cs-track-play svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  fill: currentColor !important;
  pointer-events: none;
}
button.cs-track-play .cs-track-play-pause { display: none !important; }
button.cs-track-play.is-current.is-playing .cs-track-play-play { display: none !important; }
button.cs-track-play.is-current.is-playing .cs-track-play-pause { display: block !important; }

/* Prominent hero play button (cs-song-play) — used on the song page */
.cs-song-play {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: #A98841;
  color: #0A1820;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 160ms ease, transform 120ms ease;
  box-shadow: 0 6px 18px rgba(169,136,65,0.25);
}
.cs-song-play:hover {
  background: #C9A661;
  transform: translateY(-2px);
  color: #0A1820;
}
.cs-song-play-icon {
  width: 28px; height: 28px;
  background: #0A1820;
  color: #A98841;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cs-song-play-icon svg { width: 14px; height: 14px; fill: currentColor; }
.cs-song-play.is-playing .cs-song-play-icon-play { display: none; }
.cs-song-play .cs-song-play-icon-pause { display: none; }
.cs-song-play.is-playing .cs-song-play-icon-pause { display: block; }

/* Mobile — stack into two rows */
@media (max-width: 720px) {
  .cs-player { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .cs-player-meta { flex: 1 1 100%; order: -1; }
  .cs-player-progress { flex: 1 1 100%; order: 10; }
  .cs-player-time { order: 11; flex: 1 1 auto; text-align: right; }
  .cs-player-cover { width: 38px; height: 38px; }
  .cs-player-toggle { width: 40px; height: 40px; }
  .cs-player-toggle svg { width: 20px; height: 20px; }
}
