/* ==========================================================================
   Mind Wide Open — Episode Detail Page
   Loaded in addition to css/styles.css (shared tokens, header, footer, buttons)
   ========================================================================== */

.episode-hero{
  background: var(--teal-dark);
  color: var(--cream);
  padding: var(--space-5) 0 var(--space-6);
}
/* teal-dark outline is too low-contrast for focus rings here — same fix as
   the homepage footer/statement sections */
.episode-hero :focus-visible{
  outline-color: var(--cream);
}

.back-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--terracotta-on-dark);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-4);
  transition: filter var(--dur) var(--ease);
}
.back-link:hover{ filter: brightness(1.15); }
.back-link svg{ width: 14px; height: 14px; }

/* ---------- Video ---------- */

.ep-video-wrap{ position: relative; }

.ep-video-frame{
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
}
.ep-video-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ep-video-facade{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}
.ep-video-thumb-bg{
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--teal-tint) 0%, var(--cream) 60%);
  border: 1.5px dashed var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* real YouTube thumbnail (i.ytimg.com) in place of the placeholder gradient */
.ep-video-thumb-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-overlay-title--lg{
  font-size: var(--step-2);
  right: var(--space-4);
  left: var(--space-4);
  bottom: var(--space-3);
}

.ep-play-btn{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.92);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(20, 35, 31, 0.35);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.ep-play-btn svg{ width: 26px; height: 26px; margin-left: 4px; }
.ep-video-facade:hover .ep-play-btn,
.ep-video-facade:focus-visible .ep-play-btn{
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--cream);
}

.ep-video-host-label{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(20, 35, 31, 0.72);
  color: var(--cream);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.ep-video-icons{
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.ep-icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 35, 31, 0.72);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ep-icon-btn:hover{ background: rgba(20, 35, 31, 0.9); transform: translateY(-2px); }
.ep-icon-btn svg{ width: 18px; height: 18px; }
.ep-icon-btn[aria-pressed="true"]{ background: var(--terracotta-text); }

.ep-youtube-badge{
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: transform var(--dur) var(--ease);
}
.ep-youtube-badge:hover{ transform: translateY(-2px); }
.ep-youtube-badge svg{ width: 16px; height: 16px; }

/* ---------- Info row ---------- */

.ep-info-row{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.ep-info-main h1{
  color: var(--cream);
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.1;
}
.ep-info-meta{
  color: rgba(247, 243, 236, 0.75);
  margin-top: var(--space-2);
  font-size: 0.9375rem;
}
.ep-listen-buttons{
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
  min-width: 220px;
}
.ep-listen-buttons .btn{ width: 100%; }

/* ---------- Description ---------- */

.episode-description{ padding: var(--space-6) 0; }
.episode-description .wrap{ max-width: 760px; }
.episode-description p{
  color: var(--ink-soft);
  margin-top: var(--space-3);
  font-size: var(--step-1);
  max-width: 68ch;
}

/* ---------- Newsletter card ---------- */

.episode-newsletter{ padding: 0 0 var(--space-6); }
.newsletter-card{
  background: var(--terracotta-tint);
  border-radius: 16px;
  padding: var(--space-5);
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-card h2{ font-size: var(--step-2); }
.newsletter-card > p{ color: var(--ink-soft); margin-top: var(--space-2); }
.newsletter-card form{ margin-top: var(--space-4); text-align: left; }
.newsletter-card .field{ margin-bottom: var(--space-3); }
.newsletter-card label{
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.newsletter-card input[type="email"]{
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
.newsletter-card input:focus{ border-color: var(--teal-dark); outline: none; }
.newsletter-card .btn{ width: 100%; }

.recaptcha-placeholder{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}
.recaptcha-placeholder input[type="checkbox"]{ width: 22px; height: 22px; flex-shrink: 0; }
.recaptcha-caption{ font-size: 0.75rem; color: var(--ink-soft); line-height: 1.3; }

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

@media (max-width: 768px){
  .ep-info-row{
    flex-direction: column;
    align-items: stretch;
  }
  .ep-listen-buttons{ width: 100%; }
  .ep-play-btn{ width: 60px; height: 60px; }
  .ep-play-btn svg{ width: 20px; height: 20px; }
  .newsletter-card{ padding: var(--space-4); }
}

@media (max-width: 640px){
  .episode-hero{ padding: var(--space-4) 0 var(--space-5); }
  .ep-info-main h1{ font-size: var(--step-3); }
}
