/* =================================================================
   components.css – MemoriaMoment
   Gemeinsame Komponenten-Styles für alle Seiten.
   Eingebunden in: index.html, galerie.html, hoerproben.html
================================================================= */


/* ──────────────────────────────────────────────────────────────
   HP-CARD  (Hörproben-Karte)
────────────────────────────────────────────────────────────── */
.hp-card {
  background: rgba(251, 242, 230, 0.85);
  border: 1px solid rgba(122, 74, 30, 0.14);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(100, 50, 10, 0.09);
  backdrop-filter: blur(8px);
}

.hp-card-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hp-emoji-wrap {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8772a 0%, #dba94e 35%, #c9845a 70%, #a05535 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-right: 12px;
}

.hp-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
  background: linear-gradient(135deg, #b8772a 0%, #dba94e 35%, #c9845a 70%, #a05535 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hp-card-desc {
  font-size: 0.9rem;
  color: #6b6966;
  line-height: 1.5;
  margin-top: 3px;
}

.hp-song {
  margin-top: 12px;
}

.hp-song + .hp-song {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 12px;
  padding-top: 12px;
}

.hp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.hp-meta-item {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.hp-meta-item--person   { background: rgba(1, 105, 111, 0.10);  color: #01696f; }
.hp-meta-item--voice    { background: rgba(0, 0, 0, 0.06);       color: #6b6a66; }
.hp-meta-item--genre    { background: rgba(184, 119, 42, 0.12);  color: #9a6022; }
.hp-meta-item--subgenre { background: rgba(0, 0, 0, 0.04);       color: #8a8a86; font-style: italic; }
.hp-meta-item--lang     { background: rgba(82, 80, 160, 0.10);   color: #5250a0; }

.index-hp-wrap {
  max-width: 560px;
  margin: 0 auto 28px;
}


/* ──────────────────────────────────────────────────────────────
   CUSTOM AUDIO PLAYER
────────────────────────────────────────────────────────────── */
.cp-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(184, 119, 42, 0.07);
  border: 1px solid rgba(184, 119, 42, 0.18);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cp-audio {
  display: none;
}

.cp-play-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8772a 0%, #dba94e 35%, #c9845a 70%, #a05535 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(184, 119, 42, 0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.cp-play-btn:active {
  transform: scale(0.93);
  box-shadow: 0 2px 6px rgba(184, 119, 42, 0.20);
}

.cp-play-btn:focus-visible {
  outline: 2px solid #dba94e;
  outline-offset: 3px;
}

.cp-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.cp-icon-pause {
  display: none;
}

.cp-progress-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.cp-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.cp-bar {
  width: 100%;
  height: 4px;
  background: rgba(184, 119, 42, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.cp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8772a, #dba94e, #c9845a);
  transition: width 0.1s linear;
  pointer-events: none;
}

.cp-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9a6022;
  min-width: 30px;
  text-align: right;
}

@media (max-width: 420px) {
  .cp-wrap {
    gap: 9px;
    padding: 7px 11px 7px 7px;
  }

  .cp-play-btn {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
  }

  .cp-time {
    font-size: 0.68rem;
    min-width: 28px;
  }
}


/* ──────────────────────────────────────────────────────────────
   GALERIE-KARTEN  +  ALBUM-VIDEO-PLAYER
   Stacking-Reihenfolge (von unten nach oben):
     z-index 0  →  .album-video   (Video selbst)
     z-index 1  →  .album-poster  (Vorschaubild als <img>)
     z-index 2  →  .album-overlay (Gradient + Play-Button)
────────────────────────────────────────────────────────────── */
.gal-list {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .gal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gal-card {
  background: rgba(251, 242, 230, 0.85);
  border: 1px solid rgba(122, 74, 30, 0.14);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(100, 50, 10, 0.09);
  backdrop-filter: blur(8px);
}

/* Container: stacking context für alle Kind-Elemente */
.gal-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, rgba(184, 119, 42, 0.14), rgba(160, 85, 53, 0.08));
  cursor: pointer;
  overflow: hidden;
}

/* Ebene 0 – Video */
.album-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Ebene 1 – Poster-Bild (separates <img>, immer sichtbar bis .playing) */
.album-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  pointer-events: none;
}

/* Ebene 2 – Overlay mit Play-Button */
.album-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.10));
  pointer-events: auto;   /* ← war: none */
  cursor: pointer;        /* ← neu */
  transition: opacity 0.25s ease;
  z-index: 2;
}

.album-overlay span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  background: linear-gradient(135deg, #b8772a 0%, #dba94e 35%, #c9845a 70%, #a05535 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* Video spielt: Poster + Overlay ausblenden */
.gal-media.playing .album-poster,
.album-item.playing .album-poster {
  display: none;
}

.gal-media.playing .album-overlay,
.album-item.playing .album-overlay {
  opacity: 0;
}

.gal-card-info {
  padding: 16px;
}

.gal-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #b8772a 0%, #dba94e 35%, #c9845a 70%, #a05535 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.gal-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  background: rgba(0, 0, 0, 0.05);
  color: #6d6a67;
}

.gal-tag--type {
  background: rgba(184, 119, 42, 0.12);
  color: #9a6022;
}

.gal-card-desc {
  color: #5f5a56;
  line-height: 1.6;
  font-size: 0.95rem;
}


/* =================================================================
   DARK MODE
================================================================= */
@media (prefers-color-scheme: dark) {

  .hp-card {
    background: rgba(28, 27, 25, 0.88);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .hp-card-desc { color: #9a9896; }

  .hp-meta-item--person   { background: rgba(79, 152, 163, 0.18);  color: #4f98a3; }
  .hp-meta-item--voice    { background: rgba(255, 255, 255, 0.08); color: #9a9894; }
  .hp-meta-item--genre    { background: rgba(184, 119, 42, 0.20);  color: #c9905a; }
  .hp-meta-item--subgenre { background: rgba(255, 255, 255, 0.05); color: #7a7876; }
  .hp-meta-item--lang     { background: rgba(130, 120, 220, 0.18); color: #a09ae0; }

  .hp-song + .hp-song     { border-color: rgba(255, 255, 255, 0.08); }

  .cp-wrap { background: rgba(184, 119, 42, 0.11); border-color: rgba(184, 119, 42, 0.25); }
  .cp-bar  { background: rgba(184, 119, 42, 0.22); }
  .cp-time { color: #c9905a; }

  .album-video { background: #1a1816; }

  .gal-card {
    background: rgba(28, 27, 25, 0.88);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
  }

  .gal-card-desc { color: #9a9691; }
  .gal-tag       { background: rgba(255, 255, 255, 0.07); color: #8a8884; }
  .gal-tag--type { background: rgba(184, 119, 42, 0.18);  color: #c9905a; }

  .gal-media {
    background: linear-gradient(135deg, rgba(184, 119, 42, 0.18), rgba(160, 85, 53, 0.12));
  }
}
