/* ===== Album-Grundlayout (WP-typisch) ===== */

.album {
  margin: 0 auto;
  padding: 1rem;
  color: #111;
}

.title 
{
  font-size:12pt;
  font-weight:bold;
}
/* =========================== */
/* KH Audio Player – Modern BW */
/* =========================== */

/* Container */
.kh-audio.modern {
  max-width: 600px;
  background: #CCCC99;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 16px;
  font-family: sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kh-audio {
    --wave-played: #111;
    --wave-upcoming: #666633; /* Hier jetzt z.B. Rot für "noch nicht gespielt" */
}

/* Track Title */
.kh-audio__title {
  font-weight: 600;
  font-size: 11pt;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 12px;
}

/* Waveform Container */
.kh-audio__progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  position: relative;
}

.kh-audio__wave {
  width: 100%;
  height: 64px;
  background: #666633;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    /* Verhindert Flackern während der ersten Millisekunden */
    background: rgba(0,0,0,0.02); 
    border-radius: 4px;

}

.kh-audio__wave-time {
  opacity: 0;
  pointer-events: none; 
  position: absolute;
  top: -1.6em;
  font-size: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  transform: translateX(-50%);
  white-space: nowrap;
}
/* Zeitanzeige rechts unten in der Waveform */
.kh-audio__time {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 1rem;  /* kleiner */
  color: #555;
  background: rgba(255,255,255,0.6); /* optional leicht transparent */
  padding: 0 4px;
  border-radius: 1px;
}
.kh-audio__controls {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Transport links, Actions rechts */
  gap: 12px;
  margin-bottom: 12px;
}
/* ================== */
/* Controls – Zwei Reihen */
/* ================== */
.kh-audio__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Transport Buttons */
.kh-audio__transport {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kh-audio__transport button {
  all: unset; /* Theme Reset */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #111;
  color: #fff;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  transition: background 0.2s;
}

.kh-audio__transport button:hover {
  background: #333;
}

/* Play-Pause SVG proportional */
.kh-audio__play svg.icon-play,
.kh-audio__play svg.icon-pause {
  width: 16px;
  height: 16px;
}

/* Actions Buttons (Vol, Playlist, Download) */
.kh-audio__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Volume Slider */
.kh-audio__vol {
  width: 120px;
  accent-color: #111;
}

/* Playlist Button */
.kh-audio__playlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid #111;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: #111;
  background: #fff;
  transition: all 0.2s;
}

.kh-audio__playlist-btn:hover,
.kh-audio__playlist-btn:has(input:checked) {
  background: #111;
  color: #fff;
}

.kh-audio__playlist-btn input {
  display: none;
}

/* Download Button */
.kh-audio__download-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  cursor: pointer;
  background: #111;
  color: #fff;
  border-radius: 4px;
  transition: background 0.2s;
}

.kh-audio__download-btn:hover {
  background: #333;
}

.kh-audio__download-btn svg {
  width: 20px;
  height: 20px;
}

/* ================== */
/* Tracklist */
.kh-audio__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kh-audio__item {
  margin: 0.25rem 0;
}

.kh-audio__pick {
  display: grid;
  grid-template-columns: 40px 1fr 50px; /* Trackno | Titel | Länge */
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  color: #111;
  cursor: pointer;
  transition: background 0.2s;
}

.kh-audio__pick:hover {
  background: #e0e0e0;
}

.kh-audio__item.is-active .kh-audio__pick {
  background: #111;
  color: #fff;
}

.kh-audio__trackno {
  text-align: right;
  font-variant-numeric: normal;
}

.kh-audio__tracklength {
  text-align: right;
  font-size: 0.85rem;
  color: #666;
}
/* Styling für Songs ohne Audio-Datei */
.kh-audio__item.is-empty {
    opacity: 0.5;
    cursor: default;
    font-style: italic;
}

.kh-audio__item.is-empty .kh-audio__pick {
    pointer-events: none; /* Nicht klickbar */
}

/* ================== */
/* Responsiv */


@media (max-width: 480px) {
 /* Bar: Transport oben, Actions darunter */
  .kh-audio__bar {
    flex-direction: column;
    align-items: flex-start; /* linksbündig */
    gap: 8px; /* optional Abstand zwischen Reihen */
  }

  /* Actions unter Transport */
  .kh-audio__actions {
	  display:block;
    width: 100%; /* optional volle Breite */
    justify-content: flex-start;
  }

  /* Download-Button ausblenden */
  .kh-audio__download-btn {
    display: none;
  }

  /* Lautstärke ggf. anpassen */
  .kh-audio__vol {
    width: 100px; /* kleiner auf Mobile */
  }

  /* Playlist-Button evtl. breiter */
  .kh-audio__playlist-btn {
    flex-grow: 1;
  }
}
