/**
 * Audio transcript styling — replaces the previous bare block of text
 * with a proper scrollable, readable panel, plus a collapse/expand
 * toggle since some transcripts run 60,000-100,000+ characters.
 */

/* Sticky audio player — stays visible at the top of the viewport while
   the visitor scrolls down through the transcript below it, so playback
   controls are always reachable. */
.section-audio-player {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #fff;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  margin-bottom: 2.4rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.section-transcript .section-content {
  position: relative;
  max-height: 1000px;
  overflow-y: auto;
  padding: 2.4rem;
  background-color: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  line-height: 1.8;
  font-size: 1.9rem;
  color: #333;
  scroll-behavior: smooth;
}


.section-transcript .section-content blockquote {
  font-size: 1.7rem;
  padding: 1.2rem 2rem;
  margin: 1.2rem 0;
}


.section-transcript .section-content h1,
.section-transcript .section-content h2,
.section-transcript .section-content h3,
.section-transcript .section-content h4,
.section-transcript .section-content h5,
.section-transcript .section-content h6 {
  font-size: 3.1rem;
  margin: 1.6rem 0 0.8rem;
  line-height: 1.4;
}

.section-transcript .section-content p {
  margin-bottom: 1.2rem;
}

.section-transcript.-collapsed .section-content {
  max-height: 600px;
}

.transcript-toggle-btn {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.8rem 1.6rem;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.4rem;
}

.transcript-toggle-btn:hover {
  background-color: #f0f0f0;
}

/* main.css hides the raw <audio> element with display:none, which runs
   BEFORE MediaElement.js has a chance to measure its size. Let it render
   invisibly instead (zero size, but still measurable) so MediaElement
   can read its real dimensions before hiding it itself. */
audio {
  display: inline !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  position: absolute !important;
}

/**
 * Clean, modern audio player skin — a full rebuild rather than patching
 * the original theme's skin, which had accumulated multiple layout bugs
 * from being designed for a taller layout that no longer exists. Uses a
 * single-row flexbox layout instead of the old absolute-positioning
 * approach, which was the actual root of every problem we kept chasing.
 */
.mejs-container {
  background: #f8f9fa !important;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 1.2rem 1.6rem !important;
  box-sizing: border-box;
}

.mejs-inner {
  position: static !important;
}

.mejs-mediaelement,
.mejs-layers {
  display: none !important;
}

.mejs-controls {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  gap: 1.2rem;
  width: 100% !important;
  height: auto !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Play/pause button */
.mejs-controls .mejs-button.mejs-playpause-button {
  position: static !important;
  flex: 0 0 auto;
  width: 3.6rem;
  height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2971B1;
  border-radius: 50%;
}

.mejs-controls .mejs-playpause-button button {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-image: none !important;
  color: #fff !important;
}

/* Kill both the original skin's icon (::after) and our earlier
   font-icon attempt (::before) entirely — the font-icon approach was
   rendering unreliably here, so we're drawing the icons as pure CSS
   shapes instead, which removes any dependency on font loading. */
.mejs-controls .mejs-playpause-button button::before,
.mejs-controls .mejs-playpause-button button::after {
  content: none !important;
  display: none !important;
}

/* Play triangle — drawn directly on the button's own ::before as a
   pure CSS border-triangle. No inner <span> needed, no font glyph. */
.mejs-controls .mejs-play button {
  position: relative !important;
}

.mejs-controls .mejs-play button::before {
  content: "" !important;
  display: block !important;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
  margin-left: 3px; /* optical centering */
}

/* Pause bars — two simple rectangles, same approach */
.mejs-controls .mejs-pause button {
  position: relative !important;
}

.mejs-controls .mejs-pause button::before {
  content: "" !important;
  display: block !important;
  width: 3px;
  height: 14px;
  background: #fff;
  box-shadow: 6px 0 0 #fff;
}

.mejs-controls .mejs-playpause-button button::before {
  font-family: "FontAwesome" !important;
  font-size: 1.4rem;
  line-height: 1;
}

.mejs-controls .mejs-play button::before {
  content: "\f04b"; /* play triangle */
  margin-left: 2px; /* optically center the triangle shape */
}

.mejs-controls .mejs-pause button::before {
  content: "\f04c"; /* pause bars */
}

/* Current time */
.mejs-controls .mejs-time.mejs-currenttime-container {
  position: static !important;
  flex: 0 0 auto;
  font-size: 1.3rem;
  color: #555;
  min-width: 4rem;
}

/* Progress bar — fills the remaining space between the times */
.mejs-controls .mejs-time-rail {
  position: static !important;
  flex: 1 1 auto;
  margin: 0 !important;
}

.mejs-controls .mejs-time-rail .mejs-time-total,
.mejs-controls .mejs-time-rail .mejs-time-slider {
  position: relative !important;
  width: 100% !important;
  height: 0.6rem !important;
  border-radius: 3px;
  border: none !important;
  background: #e0e0e0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.mejs-controls .mejs-time-rail .mejs-time-loaded {
  background: #cdd8e3 !important;
  border-radius: 3px;
}

.mejs-controls .mejs-time-rail .mejs-time-current {
  background: #2971B1 !important;
  border-radius: 3px;
}

.mejs-controls .mejs-time-rail .mejs-time-handle {
  background: #2971B1 !important;
  border: 2px solid #fff !important;
  border-radius: 50%;
  width: 1.4rem !important;
  height: 1.4rem !important;
  top: -0.4rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Duration */
.mejs-controls .mejs-time.mejs-duration-container {
  position: static !important;
  flex: 0 0 auto;
  font-size: 1.3rem;
  color: #555;
  min-width: 4rem;
  text-align: right;
}

/* Volume — a simple mute toggle, using a font icon rather than the
   skin's original sprite-image approach for reliability/consistency
   with the play button. The flyout volume slider stays hidden — just
   a click-to-mute toggle. */
.mejs-controls .mejs-volume-button {
  position: static !important;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
}

.mejs-controls .mejs-volume-button button {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  background-image: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #2971B1 !important;
}

.mejs-controls .mejs-volume-button button::before {
  font-family: "FontAwesome" !important;
  font-size: 1.4rem;
  line-height: 1;
}

.mejs-controls .mejs-unmute button::before {
  content: "\f028"; /* volume icon */
}

.mejs-controls .mejs-mute button::before {
  content: "\f026"; /* muted icon */
}

.mejs-controls .mejs-volume-slider {
  display: none !important;
}

@media (max-width: 480px) {
  .mejs-controls .mejs-time.mejs-currenttime-container,
  .mejs-controls .mejs-time.mejs-duration-container {
    display: none;
  }
}

/* Horizontal volume slider — hidden by default in the original skin
   (display:none), overridden to show it inline next to the mute
   button, styled to match the site's blue accent. */
.mejs-controls .mejs-horizontal-volume-slider {
  display: block !important;
  position: relative !important;
  width: 8rem !important;
  height: 0.6rem !important;
  flex: 0 0 auto;
}

.mejs-controls .mejs-horizontal-volume-total {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  background: #e0e0e0 !important;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.mejs-controls .mejs-horizontal-volume-current {
  position: absolute !important;
  top: 0;
  left: 0;
  height: 100% !important;
  background: #2971B1 !important;
  border-radius: 3px;
}