.podcast-player {
  --podcast-accent: #ff000f;
  --podcast-surface: #f4f4f4;
  --podcast-radius: 1.5rem;

  display: block;
  color: #1a1a1a;
}

/* The paragraph must sit above the hero stage (which has a positioned
   ::before pattern), otherwise it renders underneath the header. It is pulled
   up into the hero's (matching) bottom padding by the shared overlap variable. */

.paragraph--type--abb-podcast-episode {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--podcast-overlap, 5rem));
}

/* Body grid. The .abb-grid utility class (in the markup) owns the 12-column
   track definition and the page gutter at every breakpoint — we only set the
   column spans below. Mobile-first: card, separator and summary each span the
   full row (1 / -1) so they stack; from md they sit side by side. */

.podcast-player__body {
  align-items: start;
  border-radius: var(--podcast-radius);
  background: #fff;
  row-gap: 2rem;
  padding-block: 1.5rem;
}

/* Left column: the card + the streaming buttons underneath it. */

.podcast-player__col {
  grid-column: 1 / -1;
}

.podcast-player__card {
  padding: 1rem;
  border-radius: var(--podcast-radius);
  background: var(--podcast-surface);
  box-shadow: 0 1.5rem 2rem 0 #00000026;
}

/* Separator — muted divider colour from the palette. Stacked layout: a
   horizontal rule between card and summary. Flips to vertical at md (below). */

.podcast-player__separator {
  grid-column: 1 / -1;
  justify-self: stretch;
  height: var(--dxp-line-width, 1px);
  background: var(--color-border, rgba(0, 0, 0, 0.16));
}

.podcast-player__summary {
  grid-column: 1 / -1;
  padding-block: 1.5rem;
}

.podcast-player__share {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.podcast-player__share .sharing__wrapper {
  margin-bottom: 0.75rem;
  padding: 0;
  /* The global sharing component draws a divider above the icons
     (.sharing__wrapper border-top); not wanted inside the podcast card. */
  border-top: 0;
}

/* Player + consent ------------------------------------------------------- */

.podcast-player__player {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  /* Consent poster is at least square; relax once the player has loaded. */
  aspect-ratio: 1;
}

.podcast-player__player:has(.podcast-player__embed[data-loaded="true"]) {
  aspect-ratio: auto;
}

.podcast-player__embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.podcast-player__consent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.podcast-player__consent.is-hidden {
  display: none;
}

.podcast-player__consent-poster {
  position: absolute;
  filter: brightness(0.55);
  background-color: #111;
  background-position: center;
  background-size: cover;
  inset: 0;
}

.podcast-player__consent-panel {
  position: relative;
  width: 100%;
  padding: 1.5rem;
  color: #fff;
}

.podcast-player__ep {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.05em;
  border-radius: 0.4rem;
  background: var(--podcast-accent);
  font-size: 0.7rem;
  font-weight: 700;
}

.podcast-player__consent-text {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.podcast-player__consent-link {
  text-decoration: underline;
  color: #fff;
}

.podcast-player__consent-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  border: 0;
  border-radius: 2rem;
  background: var(--podcast-accent);
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.5rem;
}

.podcast-player__consent-accept:hover {
  background: #d4000c;
}

.podcast-player__duration {
  font-variant-numeric: tabular-nums;
}

/* "Listen on …" buttons under the player card. The container is a query
   container so the two layouts can differ:
   - enough room for both (≥ 2 × 11.75rem + gap): side by side, growing to
     fill the row together (equal width);
   - not enough room: stacked, each only as wide as the wider label
     (11.75rem), not the full row. */

.podcast-player__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  container-type: inline-size;
}

.podcast-player__platform {
  /* Stacked default: fixed to the wider button's width, no growing. */
  flex: 0 0 auto;
  min-width: 11.75rem;
}

@container (min-width: 24.25rem) {
  .podcast-player__platform {
    /* Side by side: share the full row equally. */
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Custom outlined "Listen on …" buttons: brand icon + two-line label, theme
   font, rounded corners. A small, self-contained button type for the podcast. */

.podcast-player__platform {
  --svg-color: currentColor;

  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  color: inherit;
  border: 0.125rem solid #000;
  border-radius: var(--dxp-style-radius-sm, 8px);
  gap: 0.625rem;
}

.podcast-player__platform:hover {
  text-decoration: none;
  border-color: currentColor;
  background: rgba(0, 0, 0, 0.03);
}

.podcast-player__platform:focus-visible {
  outline: 0.125rem solid var(--dxp-color-brand-primary, #ff000f);
  outline-offset: 0.125rem;
}

.podcast-player__platform .abb-icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

/* The Spotify glyph is visually heavier/wider than the podcast icon, so trim
   it slightly to make the two marks look optically the same size. */

.podcast-player__platform--spotify .abb-icon {
  width: 1.3rem;
  height: 1.3rem;
}

.podcast-player__platform-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.podcast-player__platform-pre {
  opacity: 0.7;
  font-size: 0.7rem;
  font-weight: 500;
}

.podcast-player__platform-name {
  font-size: 1rem;
  font-weight: 700;
}

/* Summary ---------------------------------------------------------------- */

.podcast-player__summary-title {
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 800;
}

.podcast-player__date {
  display: inline-block;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #555;
  font-size: 0.8rem;
  font-weight: 700;
}

.podcast-player__summary-text {
  font-size: 1rem;
  line-height: 1.6;
}

/* CKEditor lists in the summary: same bullet marker as the main menu
   (menu-main__flyout-item-benefits-icon → assets/images/Bullet-2.svg).
   Scoped to this component on purpose: the summary is raw markup that does not
   inherit the global .text-formatted list styling, and we don't want a global
   rule for it. Referenced by the same absolute path the menu uses. */

.podcast-player__summary-text ul {
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.podcast-player__summary-text ul li {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 1.75rem;
}

.podcast-player__summary-text ul li::before {
  position: absolute;
  top: 0.1em;
  left: 0;
  width: 1.25rem;
  height: 1.25rem;
  content: "";
  background: url("/themes/custom/abb/assets/images/Bullet-2.svg") no-repeat center / 1.25rem 1.25rem;
}

.podcast-player__summary-text ul li:last-child {
  margin-bottom: 0;
}

/* Responsive ------------------------------------------------------------- */

/* md: card and summary side by side, vertical separator between them.
   Card a touch wider here since it shares the row with only the summary. */

@media all and (width >= 768px) {
  .podcast-player__body {
    padding-block: 2.5rem;
  }

  .podcast-player__col {
    grid-column: 1 / 6;
  }

  .podcast-player__separator {
    grid-column: 6;
    align-self: stretch;
    justify-self: center;
    width: var(--dxp-line-width, 1px);
    height: auto;
  }

  .podcast-player__summary {
    grid-column: 7 / 13;
  }
}

/* lg: full design proportions — card (1/5), separator (5), summary (6/13)
   — and the generous 5rem inner padding. */

@media all and (width >= 1024px) {
  .podcast-player__body {
    padding-block: 5rem;
  }

  .podcast-player__col {
    grid-column: 1 / 5;
  }

  .podcast-player__separator {
    grid-column: 5;
  }

  .podcast-player__summary {
    grid-column: 6 / 13;
  }
}
