/* Podcastliste: lokal begrenzt. Kein eigenes Bereichsschema, daher das redaktionelle Blau des Design Systems. */
/* Selektor schlägt main>div.hwx-lmdb-list-basetiles; als Flex-Container richtete sich die Breite sonst nach dem Inhalt. */
main > div.hwx-podcasts-view {
  display: block;
  inline-size: 100%;
  --podcast-action: #164f9e;
  --podcast-hover: #103b76;
  --podcast-soft: #e3eaf3;
  --podcast-ink: #0c3247;
  --podcast-text: #303030;
  --podcast-muted: #596975;
  --podcast-line: #dbe3e8;
  --podcast-surface: #f5f8fa;
  --podcast-red: #d11f34;
  max-inline-size: 1320px;
  margin-inline: auto;
  padding-block: 2rem;
}

.hwx-podcasts-view :is(.hwx-lmdb-page-title, .hwx-lmdb-list-title) {
  margin-block-end: 1.5rem;
}

.hwx-podcasts-view .hwx-lmdb-page-title .hwx-lmdb-page-title-text,
.hwx-podcasts-view .hwx-lmdb-list-title h1.hwx-lmdb-list-title {
  margin: 0;
  color: var(--podcast-ink);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
  text-wrap: balance;
}

/* Filterleiste: Pillen laut Design System, Auswahl über aria-current und nicht nur über Farbe. */
.hwx-podcasts-view .hwx-podcast-filter {
  display: grid;
  gap: .75rem;
  margin-block-end: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--podcast-line);
  border-radius: .875rem;
  background: #fff;
}

.hwx-podcasts-view .hwx-podcast-filter__group {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: start;
  gap: .5rem;
}

.hwx-podcasts-view .hwx-podcast-filter__label {
  color: var(--podcast-ink);
  font-size: .875rem;
  font-weight: 700;
  line-height: 2.25rem;
}

.hwx-podcasts-view .hwx-podcast-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hwx-podcasts-view .hwx-podcast-filter__chip {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.25rem;
  padding-inline: .875rem;
  border: 1px solid var(--podcast-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--podcast-ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.hwx-podcasts-view .hwx-podcast-filter__chip[aria-current] {
  border-color: var(--podcast-action);
  background: var(--podcast-action);
  color: #fff;
}

.hwx-podcasts-view .hwx-podcast-filter__chip:focus-visible {
  outline: 3px solid var(--podcast-action);
  outline-offset: 3px;
}

@media (hover: hover) {
  .hwx-podcasts-view .hwx-podcast-filter__chip:not([aria-current]):hover {
    border-color: var(--podcast-hover);
    background: var(--podcast-soft);
    color: var(--podcast-hover);
    text-decoration: underline;
    text-underline-offset: .2em;
  }

  .hwx-podcasts-view .hwx-podcast-filter__chip[aria-current]:hover {
    border-color: var(--podcast-hover);
    background: var(--podcast-hover);
    color: #fff;
  }
}

/* Raster */
.hwx-podcasts-view .hwx-lmdb-list-items {
  display: grid;
  inline-size: 100%;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: 1.25rem;
}

.hwx-podcasts-view .hwx-lmdb-list-items > .hwx-lmdb-list-item.hwx-lmdb-list-item-adbanner {
  grid-column: 1 / -1;
  min-inline-size: 0;
}

/* Karte: Das Cover füllt randlos die linke Seite; die Spalte entspricht etwa der üblichen Kartenhöhe, damit wenig beschnitten wird. */
.hwx-podcasts-view .hwx-lmdb-list-items .hwx-podcast-card {
  position: relative;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  min-block-size: 11rem;
  min-inline-size: 0;
  overflow: hidden;
  border: 1px solid var(--podcast-line);
  border-radius: .875rem;
  background: #fff;
  color: var(--podcast-text);
  box-shadow: 0 .45rem 1.2rem rgb(12 50 71 / 8%);
  animation: none;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

/* Das Piktogramm liegt hinter dem Bild und bleibt bei fehlendem oder defektem Cover sichtbar. */
.hwx-podcasts-view .hwx-podcast-card__cover {
  position: relative;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b4bd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v4M8 22h8'/%3E%3C/svg%3E") center / 3rem no-repeat,
    var(--podcast-surface);
}

/* Absolut, damit das Bild die Kartenhöhe nicht mitbestimmt. */
.hwx-podcasts-view .hwx-podcast-card__cover img {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  margin: 0;
  object-fit: cover;
  color: transparent;
}

.hwx-podcasts-view .hwx-podcast-card .hwx-badges-bar {
  position: absolute;
  /* Die globale Regel .hwx-lmdb-list-item-badges setzt top: 0 !important. */
  inset-block-start: .375rem !important;
  inset-inline-start: .375rem;
  display: flex;
  gap: .25rem;
}

.hwx-podcasts-view .hwx-podcast-card .hwx-badges-bar .hwx-lmdb-list-item-badge {
  display: none;
  position: static;
  padding: .125rem .375rem;
  border-radius: .25rem;
  background: var(--podcast-action);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.hwx-podcasts-view .hwx-podcast-card .hwx-badges-bar .hwx-badge-new {
  background: var(--podcast-red);
}

.hwx-podcasts-view .hwx-podcast-card.is-new .hwx-badge-new,
.hwx-podcasts-view .hwx-podcast-card.is-top .hwx-badge-top,
.hwx-podcasts-view .hwx-podcast-card.is-tip .hwx-badge-tip {
  display: block;
}

.hwx-podcasts-view .hwx-podcast-card__body {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  min-inline-size: 0;
  padding: 1rem 1.25rem;
}

.hwx-podcasts-view .hwx-podcast-card__show {
  align-self: flex-start;
  max-inline-size: 100%;
  margin: 0;
  padding: .125rem .625rem;
  border-radius: 9999px;
  background: var(--podcast-soft);
  color: var(--podcast-ink);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.hwx-podcasts-view .hwx-podcast-card__title,
.hwx-podcasts-view .hwx-podcast-card__subtitle {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.hwx-podcasts-view .hwx-podcast-card__title {
  color: var(--podcast-ink);
  font-size: 1.1875rem;
  line-height: 1.25;
}

/* Global erhält der Link position: relative; dann deckte a::after nur den Titel statt der Karte ab. */
.hwx-podcasts-view .hwx-podcast-card__title a {
  position: static;
  color: inherit;
  text-decoration: none;
}

/* Erweiterte Klickfläche: ein nativer Link pro Karte. */
.hwx-podcasts-view .hwx-podcast-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hwx-podcasts-view .hwx-podcast-card__subtitle {
  color: var(--podcast-text);
  font-size: .9375rem;
  line-height: 1.4;
}

.hwx-podcasts-view .hwx-podcast-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .75rem;
  margin: auto 0 0;
  padding-block-start: .5rem;
  color: var(--podcast-muted);
  font-size: .8125rem;
  line-height: 1.4;
}

.hwx-podcasts-view .hwx-podcast-card__action {
  margin-inline-start: auto;
  color: var(--podcast-action);
  font-size: .875rem;
  font-weight: 700;
}

.hwx-podcasts-view .hwx-podcast-card__action i {
  margin-inline-start: .25rem;
  font-size: .75rem;
  transition: transform .2s ease;
}

/* Seitennavigation */
.hwx-podcasts-view .hwx-lmdb-list-pagination {
  margin-block-start: 2rem;
}

.hwx-podcasts-view .hwx-lmdb-list-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .375rem;
  margin: 0 !important;
}

.hwx-podcasts-view .hwx-lmdb-list-pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  border: 1px solid var(--podcast-line);
  border-radius: .5rem !important;
  background: #fff;
  color: var(--podcast-action);
  font-weight: 600;
}

/* app.css setzt die aktive Seite global mit !important. */
.hwx-podcasts-view .hwx-lmdb-list-pagination .active .page-link {
  border-color: var(--podcast-action) !important;
  background-color: var(--podcast-action) !important;
  color: #fff !important;
}

/* app.css macht deaktivierte Pfeile nur unsichtbar; sie belegten weiter Platz und verschoben die Navigation. */
.hwx-podcasts-view .hwx-lmdb-list-pagination .page-item.disabled {
  display: none;
}

/* Fokus und Hover */
.hwx-podcasts-view .hwx-lmdb-list-pagination .page-link:focus-visible {
  outline: 3px solid var(--podcast-action);
  outline-offset: 3px;
  box-shadow: none;
}

.hwx-podcasts-view .hwx-podcast-card:has(a:focus-visible) {
  outline: 3px solid var(--podcast-action);
  outline-offset: 3px;
}

.hwx-podcasts-view .hwx-podcast-card:has(a:focus-visible) a {
  outline: none;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (hover: hover) {
  .hwx-podcasts-view .hwx-podcast-card:hover {
    border-color: var(--podcast-action);
    box-shadow: 0 .75rem 1.75rem rgb(12 50 71 / 14%);
    transform: translateY(-2px);
  }

  .hwx-podcasts-view .hwx-podcast-card:hover .hwx-podcast-card__title a {
    text-decoration: underline;
    text-underline-offset: .2em;
  }

  .hwx-podcasts-view .hwx-podcast-card:hover .hwx-podcast-card__action {
    color: var(--podcast-hover);
  }

  .hwx-podcasts-view .hwx-podcast-card:hover .hwx-podcast-card__action i {
    transform: translateX(.1875rem);
  }

  .hwx-podcasts-view .hwx-lmdb-list-pagination .page-item:not(.active, .disabled) .page-link:hover {
    border-color: var(--podcast-hover);
    background: var(--podcast-soft);
    color: var(--podcast-hover);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hwx-podcasts-view .hwx-lmdb-list-items .hwx-podcast-card,
  .hwx-podcasts-view .hwx-podcast-card__action i {
    transition: none;
  }

  .hwx-podcasts-view .hwx-podcast-card:hover,
  .hwx-podcasts-view .hwx-podcast-card:hover .hwx-podcast-card__action i {
    transform: none;
  }
}

@media (max-width: 575.98px) {
  main > div.hwx-podcasts-view {
    padding-block: 1.5rem;
  }

  .hwx-podcasts-view .hwx-podcast-filter {
    padding: 1rem;
  }

  .hwx-podcasts-view .hwx-podcast-filter__group {
    grid-template-columns: minmax(0, 1fr);
  }

  .hwx-podcasts-view .hwx-podcast-filter__label {
    line-height: 1.4;
  }

  .hwx-podcasts-view .hwx-podcast-filter__chip {
    min-block-size: 2.75rem;
  }

  .hwx-podcasts-view .hwx-lmdb-list-items {
    gap: 1rem;
  }

  .hwx-podcasts-view .hwx-lmdb-list-items .hwx-podcast-card {
    grid-template-columns: 38% minmax(0, 1fr);
    min-block-size: 7.5rem;
  }

  .hwx-podcasts-view .hwx-podcast-card__body {
    padding: .75rem 1rem;
  }

  .hwx-podcasts-view .hwx-podcast-card__title {
    font-size: 1.0625rem;
  }

  /* Zwei Zeilen halten die Karte niedrig, damit das Cover kaum beschnitten wird. */
  .hwx-podcasts-view .hwx-podcast-card__subtitle {
    font-size: .875rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  /* Sprung zur ersten und letzten Seite entfällt, damit die Navigation einzeilig bleibt. */
  .hwx-podcasts-view .hwx-lmdb-list-pagination .pagination {
    gap: .25rem;
  }

  .hwx-podcasts-view .hwx-lmdb-list-pagination .page-item:has(.icon-angle-double-left, .icon-angle-double-right) {
    display: none;
  }
}

.hwx-podcasts-view ::selection {
  background: var(--podcast-action);
  color: #fff;
}
