/**
 * File: /wp-content/plugins/ckut-amandla/assets/css/amandla-single.css
 */

.amandla-episode-single {
  --amandla-episode-background: var(--amandla-green);
  --amandla-episode-foreground: var(--amandla-dark);
  width: 100%;
  max-width: none;
  padding-bottom: 1rem;
}

.amandla-episode-single__article {
  width: 100%;
}

.amandla-episode-single__masthead {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0 max(1rem, calc((100vw - var(--amandla-content-width)) / 2));
  color: var(--amandla-episode-foreground);
  background: var(--amandla-episode-background);
  border-bottom: 1px solid color-mix(in srgb, var(--amandla-episode-foreground) 28%, transparent);
}

.amandla-episode-single__masthead-inner {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.amandla-episode-single__masthead-inner--with-media {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.amandla-episode-single__masthead-copy {
  min-width: 0;
  padding: clamp(2rem, 3vw, 5rem) 0;
}

.amandla-episode-single__eyebrow {
  margin-bottom: 1rem;
  font-family: var(--amandla-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.amandla-episode-single__title {
  max-width: 14ch;
  margin: 0;
  font-family: var(--amandla-font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.085em;
  line-height: 0.78;
  overflow-wrap: anywhere;
}

.amandla-episode-single__subtitle {
  max-width: 34ch;
  margin: 1.5rem 0 0;
  font-size: clamp(1.35rem, 3vw, 2.7rem);
  font-style: italic;
  line-height: 1.05;
}

.amandla-episode-single__summary-meta {
  display: flex;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  font-family: var(--amandla-font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.amandla-episode-single__excerpt {
  width: 100%;
  max-width: 100%;
  margin-top: 1.35rem;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.45;
}

.amandla-episode-single__excerpt p {
  margin: 0;
}

.amandla-episode-single__featured-media {
  min-width: 0;
}

.amandla-episode-single__featured-media--masthead {
  display: grid;
  min-height: clamp(340px, 34vw, 580px);
  margin: 0;
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 2rem 0;
}

.amandla-episode-single__featured-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.amandla-episode-single__featured-caption {
  margin: 0;
  padding: 0.65rem 0 0;
  font-size: 0.85rem;
}

.amandla-episode-single__content,
.amandla-episode-related,
.amandla-episode-navigation {
  width: min(100% - 2rem, var(--amandla-content-width));
  margin-right: auto;
  margin-left: auto;
}

.amandla-episode-single__content {
  max-width: var(--amandla-content-width);
}

/* Interview singles use a compact masthead thumbnail with a subtle 5px edge crop. */
.amandla-interview-single .amandla-episode-single__masthead-inner--with-media {
  grid-template-columns: minmax(0, 5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.amandla-interview-single .amandla-episode-single__featured-media--masthead {
  display: block;
  width: 100%;
  min-height: 0;
  padding: clamp(2rem, 3vw, 5rem) 0;
  align-self: start;
  overflow: hidden;
}

.amandla-interview-single .amandla-episode-single__featured-image {
  display: block;
  width: calc(100% + 10px);
  max-width: none;
  height: auto;
  margin: -5px;
  object-fit: contain;
}

/* Episode long-form layout: media left, WYSIWYG content right. */
.amandla-episode-single__media-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  align-items: start;
  gap: 1rem;
  border-top: 1px solid var(--amandla-border);
}

.amandla-episode-single__content > .amandla-episode-single__media-content:first-child {
  padding-top: 0;
  border-top: 0;
}

.amandla-episode-single__media-content .amandla-episode-section {
  padding: 0;
  border-top: 0;
}

.amandla-episode-single__media-column,
.amandla-episode-single__content-column {
  min-width: 0;
}

.amandla-episode-single__media-column {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.amandla-episode-single__media-sticky {
  display: grid;
  gap: 1rem;
}

.amandla-pinecast-player,
.pinecast-embed {
  width: 100%;
}

.amandla-episode-single__content-column .amandla-episode-prose {
  max-width: none;
}

/* Interview long-form layout: sticky Aviary video left, WYSIWYG content right. */
.amandla-interview-single__media-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  align-items: start;
  gap: 1rem;
  border-top: 1px solid var(--amandla-border);
}

.amandla-episode-single__content > .amandla-interview-single__media-content:first-child {
  padding-top: 0;
  border-top: 0;
}

.amandla-interview-single__media-content .amandla-episode-section {
  padding: 0;
  border-top: 0;
}

.amandla-interview-single__video-column,
.amandla-interview-single__content-column {
  min-width: 0;
}

.amandla-interview-single__video-column {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.amandla-interview-single__video-sticky {
  position: static;
}

.amandla-interview-single__content-column .amandla-episode-prose {
  max-width: none;
}

@media (max-width: 960px) {
  .amandla-episode-single__masthead-inner--with-media {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .amandla-episode-single__masthead-copy {
    padding-bottom: clamp(2rem, 5vw, 3rem);
  }

  .amandla-episode-single__featured-media--masthead {
    min-height: min(62vw, 520px);
  }

  .amandla-interview-single .amandla-episode-single__masthead-inner--with-media {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .amandla-interview-single .amandla-episode-single__featured-media--masthead {
    width: min(100%, 360px);
    min-height: 0;
    padding-top: 0;
  }

  .amandla-episode-single__media-content,
  .amandla-interview-single__media-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .amandla-interview-single__video-column {
    position: static;
  }
  .amandla-episode-single__media-column{
    top: 0;
  }
  .amandla-episode-single__media-sticky{
    max-height: 60px;
  }
  .amandla-interview-single__video-sticky {
    position: static;
  }
}

.amandla-episode-section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--amandla-border);
}

.amandla-episode-section:first-child {
  padding-top: 0;
  border-top: 0;
}



.amandla-episode-section--airing-message {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.amandla-episode-airing-message {
  max-width: 32ch;
  margin: 0;
  font-family: var(--amandla-font-display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.amandla-episode-section__title {
  max-width: 18ch;
  margin: 0 0 1.5rem;
  font-family: var(--amandla-font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.amandla-episode-prose {
  max-width: var(--amandla-prose-width);
}



/* Gutenberg owns the long-form single-entry content. No fixed section heading is injected. */
.amandla-episode-section--body .amandla-episode-prose > :first-child {
  margin-top: 0;
}

.amandla-episode-section--body .amandla-episode-prose > :last-child {
  margin-bottom: 0;
}

.amandla-episode-meta {
  border-top: 1px solid var(--amandla-border);
}

.amandla-episode-meta__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1.55fr);
  padding: 0.9rem 0;
  gap: 1rem;
  border-bottom: 1px solid var(--amandla-border);
}

.amandla-episode-meta__label {
  font-family: var(--amandla-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.amandla-episode-meta__value {
  font-weight: 700;
}

.amandla-episode-meta__link {
  text-underline-offset: 0.2em;
}

.amandla-episode-related {
  padding-top: clamp(4rem, 9vw, 8rem);
}

.amandla-episode-related .amandla-episode-grid {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.amandla-episode-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(4rem, 9vw, 8rem);
  border: 1px solid var(--amandla-border);
}

.amandla-episode-navigation--single {
  grid-template-columns: minmax(0, 1fr);
}

.amandla-episode-navigation__item {
  --amandla-episode-background: var(--amandla-background);
  --amandla-episode-foreground: var(--amandla-text);
  position: relative;
  display: flex;
  min-height: 220px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  color: var(--amandla-episode-foreground);
  background: var(--amandla-episode-background);
  text-decoration: none;
  transition: filter 180ms ease;
}

.amandla-episode-navigation__item:hover,
.amandla-episode-navigation__item:focus-visible {
  color: var(--amandla-episode-foreground);
  filter: brightness(0.96);
}

.amandla-episode-navigation__next {
  text-align: right;
  border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.amandla-episode-navigation--next-only .amandla-episode-navigation__next {
  border-left: 0;
}

.amandla-episode-navigation__label {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--amandla-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.amandla-episode-navigation__title {
  display: block;
  max-width: 14ch;
  font-family: var(--amandla-font-display);
  font-size: clamp(1.5rem, 3vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.amandla-episode-navigation__next .amandla-episode-navigation__title {
  margin-left: auto;
}

.amandla-episode-navigation__arrow {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--amandla-font-display);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.8;
}

@media (max-width: 720px) {
  .amandla-episode-navigation__next {
    text-align: left;
    border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    border-left: 0;
  }

  .amandla-episode-navigation--next-only .amandla-episode-navigation__next {
    border-top: 0;
  }

  .amandla-episode-navigation__next .amandla-episode-navigation__title {
    margin-left: 0;
  }
}

/* Shared custom Episode, Interview, and Trailer audio player */
.amandla-audio--custom {
  padding: 0;
  color: var(--amandla-text);
  background: transparent;
  border: 0;
}

.amandla-audio--custom .amandla-audio__element {
  display: none;
}

.amandla-audio--custom .amandla-audio__controls {
  display: grid;
  grid-template-columns: auto auto minmax(100px, 1fr) auto auto minmax(76px, 110px);
  min-height: 60px;
  padding: clamp(0.8rem, 1.8vw, 1.25rem) clamp(0.9rem, 2.2vw, 1.6rem);
  align-items: center;
  gap: clamp(0.65rem, 1.7vw, 1.4rem);
  color: var(--amandla-text);
  background: transparent;
  border: 1px solid currentColor;
}

.amandla-audio--custom .amandla-audio__control {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.amandla-audio--custom .amandla-audio__control:hover,
.amandla-audio--custom .amandla-audio__control:focus-visible {
  color: inherit;
  background: transparent;
}

.amandla-audio--custom .amandla-audio__control:focus-visible,
.amandla-audio--custom .amandla-audio__range:focus-visible,
.amandla-audio--custom .amandla-audio__download:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.amandla-audio--custom .amandla-audio__play-icon {
  position: relative;
  display: block;
  width: 1.55rem;
  height: 1.7rem;
}

.amandla-audio--custom .amandla-audio__play-icon::before {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  content: "";
  transform: translate(-50%, -50%);
  border-top: 0.85rem solid transparent;
  border-bottom: 0.85rem solid transparent;
  border-left: 1.35rem solid currentColor;
}

.amandla-audio--custom.is-playing .amandla-audio__play-icon::before,
.amandla-audio--custom.is-playing .amandla-audio__play-icon::after {
  position: absolute;
  top: 0.1rem;
  width: 0.46rem;
  height: 1.5rem;
  content: "";
  background: currentColor;
  border: 0;
  transform: none;
}

.amandla-audio--custom.is-playing .amandla-audio__play-icon::before {
  left: 0.2rem;
}

.amandla-audio--custom.is-playing .amandla-audio__play-icon::after {
  right: 0.2rem;
}

.amandla-audio--custom .amandla-audio__time {
  min-width: 4ch;
  font-family: var(--amandla-font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
}

.amandla-audio--custom .amandla-audio__range {
  --amandla-range-progress: 0%;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  color: currentColor;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.amandla-audio--custom .amandla-audio__range::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.75rem;
  background: linear-gradient(
    to right,
    currentColor 0,
    currentColor var(--amandla-range-progress),
    rgba(32, 0, 0, 0.32) var(--amandla-range-progress),
    rgba(32, 0, 0, 0.32) 100%
  );
  border: 0;
  border-radius: 0;
}

.amandla-audio--custom .amandla-audio__range::-webkit-slider-thumb {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.075rem;
  appearance: none;
  -webkit-appearance: none;
  background: currentColor;
  border: 0;
  border-radius: 50%;
}

.amandla-audio--custom .amandla-audio__range::-moz-range-track {
  width: 100%;
  height: 0.75rem;
  background: rgba(32, 0, 0, 0.32);
  border: 0;
  border-radius: 0;
}

.amandla-audio--custom .amandla-audio__range::-moz-range-progress {
  height: 0.75rem;
  background: currentColor;
  border: 0;
  border-radius: 0;
}

.amandla-audio--custom .amandla-audio__range::-moz-range-thumb {
  width: 0.9rem;
  height: 0.9rem;
  background: currentColor;
  border: 0;
  border-radius: 50%;
}

.amandla-audio--custom .amandla-audio__volume-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  overflow: visible;
  fill: currentColor;
}

.amandla-audio--custom .amandla-audio__volume-wave,
.amandla-audio--custom .amandla-audio__volume-slash {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.amandla-audio--custom .amandla-audio__volume-slash {
  display: none;
}

.amandla-audio--custom.is-muted .amandla-audio__volume-wave {
  display: none;
}

.amandla-audio--custom.is-muted .amandla-audio__volume-slash {
  display: block;
}

.amandla-audio--custom .amandla-audio__download {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

@media (max-width: 760px) {
  .amandla-audio--custom .amandla-audio__controls {
    grid-template-columns: auto auto minmax(80px, 1fr) auto auto;
    min-height: 72px;
    gap: 0.65rem;
  }

  .amandla-audio--custom .amandla-audio__volume {
    grid-column: 2 / -1;
  }
}

@media (max-width: 520px) {
  .amandla-audio--custom .amandla-audio__controls {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.8rem;
  }

  .amandla-audio--custom .amandla-audio__current {
    grid-column: 2;
    grid-row: 1;
  }

  .amandla-audio--custom .amandla-audio__seek {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .amandla-audio--custom .amandla-audio__duration {
    grid-column: 3;
    grid-row: 1;
  }

  .amandla-audio--custom .amandla-audio__mute {
    grid-column: 1;
    grid-row: 3;
  }

  .amandla-audio--custom .amandla-audio__volume {
    grid-column: 2 / -1;
    grid-row: 3;
  }
}
