/* Talk Away — additions for the Featured hero carousel, the Latest
   programmes slider, Like, Share and Comments. Loaded only on pages the
   generator has de-hydrated (see lib/dehydrate.js); reuses the site's
   own design tokens (--ink, --teal, etc.) defined in the main
   stylesheet so it matches without duplicating the whole design
   system. */

/* ---------- hero carousel (Featured programmes) ---------- */
/* Only used when 2+ episodes are marked featured — see
   hero.js#heroCarouselHtml. With 0 or 1 featured episode the hero is
   still just the plain single .hero-feature card it always was. */

.hero-feature-carousel {
  position: relative;
}

.hero-slide {
  display: none;
}

.hero-slide.is-active {
  display: block;
  animation: talkaway-hero-fade .35s ease;
}

@keyframes talkaway-hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ffffff55;
  background: #172027b3;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px #17202733;
}

.hero-carousel-arrow:hover {
  background: #172027e6;
}

.hero-carousel-prev {
  inset-inline-start: 12px;
}

.hero-carousel-next {
  inset-inline-end: 12px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line, #d8e1e4);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--teal, #5a9f9d);
  transform: scale(1.25);
}

/* ---------- Latest programmes slider ---------- */

.slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.slider-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .25rem .1rem 1rem;
  margin: 0 -.1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--teal, #5a9f9d) transparent;
  flex: 1 1 auto;
  min-width: 0;
}

.slider-track::-webkit-scrollbar {
  height: 8px;
}
.slider-track::-webkit-scrollbar-thumb {
  background: var(--aqua, #bfdde2);
  border-radius: 999px;
}

.slider-item {
  flex: 0 0 auto;
  width: min(320px, 82vw);
  scroll-snap-align: start;
}

.slider-arrow {
  flex: 0 0 auto;
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line, #d8e1e4);
  background: var(--white, #fff);
  color: var(--ink, #172027);
  font-size: 1.4rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px #17202714;
}

.slider-arrow:hover {
  background: var(--aqua-soft, #eaf5f6);
}

/* Arrows are a pointer-device nice-to-have; touch/trackpad scrolling
   always works on the track itself, with or without JS. */
@media (hover: hover) and (pointer: fine) {
  .slider-arrow {
    display: inline-flex;
  }
}

.latest-section .slider-item .programme-card,
.upcoming-section .slider-item .programme-card {
  height: 100%;
}

.empty-slider-note {
  color: var(--muted, #65717a);
  font-size: .95rem;
}

/* ---------- engagement block: real YouTube like/comment counts ---------- */
/* No site-native Like, Share or Comments any more — see lib/engagement.js.
   Both pills are plain links straight to the real video on YouTube. */

.engagement-block {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.engagement-inner {
  border-top: 1px solid var(--line, #d8e1e4);
  border-bottom: 1px solid var(--line, #d8e1e4);
  padding: 1.1rem 0;
}

.engagement-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.engage-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--line, #d8e1e4);
  background: var(--white, #fff);
  color: var(--ink, #172027);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.engage-pill:hover {
  border-color: var(--teal, #5a9f9d);
  background: var(--aqua-soft, #eaf5f6);
}

.engage-count {
  min-width: 1ch;
}

.engage-label {
  color: var(--muted, #65717a);
  font-weight: 600;
  font-size: .85rem;
}

.engagement-note {
  margin: .75rem 0 0;
  color: var(--muted, #65717a);
  font-size: .85rem;
}

[dir="rtl"] .engagement-note {
  text-align: right;
}

/* ---------- YouTube subscribe widget ---------- */
/* Sits next to the existing plain "Subscribe" link in the header — see
   lib/template.js#subscribeWidgetHtml. Google's own iframe has a fixed
   intrinsic size; this just keeps it vertically aligned with the rest
   of the header-actions row and stops it wrapping awkwardly on narrow
   screens. */

.subscribe-widget {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.subscribe-widget iframe {
  max-width: 100%;
}

@media (max-width: 640px) {
  .subscribe-widget {
    display: none;
  }
}
