/*
 * YouPraise – eigene Styles (nach Bootstrap geladen)
 */

/* Hero-Box der Startseite: Worship-Bild mit dunkelgrauem Overlay (bisheriges
   text-bg-dark = #212529), damit die weiße Schrift sicher lesbar bleibt. */
.hero-stage {
  background-image:
    linear-gradient(rgba(33, 37, 41, 0.75), rgba(33, 37, 41, 0.75)),
    url("/assets/hero-worship-a0acb75e.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

/* Avatar als hochgeladenes Bild statt Initial */
img.avatar-circle {
  object-fit: cover;
  background: none;
  padding: 0;
}

.avatar-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8rem;
}

.avatar-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.4rem;
}

.avatar-hero {
  width: 6rem;
  height: 6rem;
  font-size: 2.5rem;
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.min-width-0 {
  min-width: 0;
}

/* Chat */
.chat-messages {
  height: 55vh;
  overflow-y: auto;
  background: var(--bs-tertiary-bg);
}

.chat-message {
  display: flex;
  justify-content: flex-start;
}

.chat-message .chat-bubble {
  max-width: 75%;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
}

.chat-message.message-mine {
  justify-content: flex-end;
}

.chat-message.message-mine .chat-bubble {
  background: var(--bs-primary);
  color: #fff;
  border: none;
}

.chat-message.message-mine .chat-sender {
  display: none;
}

/* Eigene Nachrichten meldet niemand */
.chat-message.message-mine .chat-report {
  display: none;
}

.chat-time {
  font-size: 0.7rem;
  opacity: 0.7;
}

.chat-body p {
  margin-bottom: 0;
}

/* Künstler-Hero (Spotify/Tidal-Stil) */
.artist-hero {
  min-height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: stretch;
}

.artist-hero-overlay {
  flex: 1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.8) 100%);
}

.artist-hero-name {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.artist-hero-mini {
  height: 90px;
  background-size: cover;
  background-position: center;
}

.artist-hero-gradient-0 { background-color: #1e3a5f; background-image: linear-gradient(135deg, #1e3a5f, #4a90d9); }
.artist-hero-gradient-1 { background-color: #4a235a; background-image: linear-gradient(135deg, #4a235a, #a569bd); }
.artist-hero-gradient-2 { background-color: #145a32; background-image: linear-gradient(135deg, #145a32, #52be80); }
.artist-hero-gradient-3 { background-color: #7b241c; background-image: linear-gradient(135deg, #7b241c, #ec7063); }
.artist-hero-gradient-4 { background-color: #6e2c00; background-image: linear-gradient(135deg, #6e2c00, #e59866); }


.favorite-btn:hover .bi-heart::before {
  content: "\f415"; /* bi-heart-fill */
  color: var(--bs-danger);
}

/* Playlist-Cover in der Bibliothek */
.playlist-cover {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--bs-primary), #6f42c1);
  flex-shrink: 0;
}

/* Extrahierter Songtext zum Mitlesen */
.lyrics-text {
  white-space: pre-wrap;
  font-family: var(--bs-font-monospace);
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 26rem;
  overflow-y: auto;
  background: var(--bs-tertiary-bg);
}

/* Feste Player-Leiste am unteren Rand (Tidal-Stil) */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
}

/* Platz für die Leiste, damit sie nichts verdeckt */
body.player-active {
  padding-bottom: 5.5rem;
}

/* Auf schmalen Schirmen nimmt der Titel den Platz, die Knöpfe stehen rechts */
.player-side {
  min-width: 0;
}

.player-side-start {
  flex: 1 1 auto;
}

.player-side-end,
.player-center {
  flex: 0 0 auto;
}

.player-cover {
  width: 3rem;
  height: 3rem;
  border-radius: 0.25rem;
  background: var(--bs-gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-gray-500);
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-btn {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  align-items: center;
}

.player-btn:hover:not(:disabled) {
  color: #fff;
}

.player-btn:disabled {
  color: rgba(255, 255, 255, 0.3);
}

.player-btn-main {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  padding: 0;
  flex-shrink: 0;
}

.player-time {
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: center;
}

.player-range {
  height: 1rem;
}

/* Der gehörte Teil wird hell gefüllt; --played setzt der Player-Controller */
.player-range::-webkit-slider-runnable-track {
  height: 0.25rem;
  border-radius: 1rem;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.9) var(--played, 0%),
    rgba(255, 255, 255, 0.25) var(--played, 0%));
}

.player-range::-moz-range-track {
  height: 0.25rem;
  border-radius: 1rem;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0.9) var(--played, 0%),
    rgba(255, 255, 255, 0.25) var(--played, 0%));
}

.player-range::-webkit-slider-thumb {
  margin-top: -0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  background-color: #fff;
}

.player-range::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  background-color: #fff;
}

.player-volume {
  width: 6rem;
  flex-shrink: 0;
}

/* Schmale Bildschirme: dünner Fortschrittsbalken statt Regler */
.player-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.player-progress-fill {
  height: 100%;
  width: 0;
  background: var(--bs-warning);
}

/* Ab Tablet-Breite tragen beide Seiten gleich viel, damit die Steuerung
   mittig sitzt – unabhängig davon, wie lang Titel und Künstlername sind. */
@media (min-width: 768px) {
  .player-side-start,
  .player-side-end {
    flex: 1 1 0;
  }

  .player-center {
    flex: 0 1 40%;
    max-width: 45rem;
  }
}

/* Play-Knopf an einzelnen Materialien */
.play-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding: 0;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  body.player-active {
    padding-bottom: 4.5rem;
  }

  .player-cover {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Warteschlangen-Ansicht: rechts angedockt, auf schmalen Schirmen als Vollbild */
.player-queue {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 22rem;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 0.5rem;
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}

.player-queue-list {
  overflow-y: auto;
}

.player-queue-count {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  font-size: 0.6rem;
  padding: 0.15rem 0.3rem;
}

.queue-section {
  letter-spacing: 0.04em;
}

.queue-row {
  border-radius: 0.25rem;
  padding: 0.15rem 0.25rem;
}

.queue-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.queue-row-current {
  background: rgba(255, 193, 7, 0.12);
  padding: 0.4rem 0.5rem;
}

.queue-row-unavailable .queue-title {
  opacity: 0.5;
}

.queue-title {
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0;
}

.queue-title:hover:not(:disabled) {
  color: var(--bs-warning);
}

.queue-group-head {
  border-left: 2px solid var(--bs-warning);
  padding: 0.35rem 0.5rem;
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.75);
}

.queue-btn {
  color: rgba(255, 255, 255, 0.6);
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.queue-btn:hover {
  color: #fff;
}

/* Aktiver Zustand von Shuffle und Wiederholung */
.player-btn.active {
  color: var(--bs-warning);
}

@media (max-width: 767.98px) {
  .player-queue {
    width: 100%;
    max-height: calc(100vh - 6rem);
    border-top-left-radius: 0;
  }
}

/* Kleinerer Play-Knopf auf den Werk-Kacheln */
.play-btn-sm {
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
}
