/* ============================================================
   FUNTALKS THEME
   White page, cobalt header (#274DFF), orange links (#FF7500)
   Body and headings: Avenir-Book from company CDN (licensed for this portal);
         system stack fallback.
   Grey for muted text: #727272
   ============================================================ */

/* Raleway is used only by the legacy home tagline. */
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@700&display=swap");

/* Avenir-Book — served from existing company CloudFront */
@font-face {
  font-family: "Avenir-Book";
  src: url("https://d2obs2d3lmpnq9.cloudfront.net/rouge-play/font/Avenir-Book.ttf")
    format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  /* ── Funtalks palette ── */
  --funtalks-cobalt: #274dff;
  --funtalks-orange: #ff7500;    /* decorative / button backgrounds */
  --funtalks-link-text: #b85800; /* accessible dark orange for text links on white; contrast ~4.74:1 (WCAG AA 	efcompliant) */
  --funtalks-grey: #727272;
  --funtalks-white: #ffffff;
  --funtalks-black: #000000;

  /* ── Override template semantic tokens ── */

  /* Background: white */
  --background: #ffffff;
  --color-bg-base: #ffffff;

  /* Foreground: black */
  --foreground: #000000;
  --color-text-base: #000000;
  --color-text-muted: #727272;
  --color-text-inverse: #ffffff;

  /* Primary: orange */
  --primary: #ff7500;
  --primary-foreground: #ffffff;
  --primary-400: #ff7500;
  --primary-500: #ff7500;
  --primary-600: #e06800;
  --color-primary: #ff7500;
  --color-primary-hover: #e06800;
  --color-modal-bg: #ffffff;

  /* Secondary / cards */
  --secondary: #f5f5f5;
  --secondary-foreground: #000000;
  --card: #f9f9f9;
  --card-foreground: #000000;

  /* Muted */
  --muted: #f0f0f0;
  --muted-foreground: #727272;

  /* Accent */
  --accent: #fff0e6;
  --accent-foreground: #000000;

  /* Border */
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #ff7500;

  /* Radius: square design system */
  --radius: 0;

  /* ── Header ── */
  --header-bg: #274dff;
  --header-text: #ffffff;
  --header-h: 60px;
  --header-shadow: none;
  --header-link-color: #ffffff;
  --header-link-hover: #ffffff; /* white-on-blue: contrast ~5.8 (WCAG AA) — underline distinguishes hover */

  /* ── Footer ── */
  --footer-bg: #ffffff;
  --footer-border: #e5e5e5;
  --footer-text: #000000;
  --footer-link: #606060;          /* #606060 on white = contrast 5.74:1 (WCAG AA). Matches legacy rgb(96,96,96). */
  --footer-link-hover: #333333;

  /* ── Typography ── */
  --font-family-body: "Avenir-Book", "Avenir Next", "Avenir", "Gill Sans",
    system-ui, -apple-system, sans-serif;
  --font-family-display: "Avenir-Book", "Avenir Next", "Avenir", "Gill Sans",
    system-ui, -apple-system, sans-serif;
  --font-family-mono: ui-monospace, monospace;

  /* ── Content surfaces ── */
  --color-surface-base: #ffffff;
  --color-surface-elevated: #f9f9f9;
  --color-border-divider: #e5e5e5;
  --color-border-base-op-16: rgba(0, 0, 0, 0.16);
  --color-overlay-dark: rgba(0, 0, 0, 0.6);
  --color-focus-outline: #ff7500;
  --color-brand-accent-500: #ff7500;
  --color-brand-accent-600: #e06800;
  --color-text-primary: #000000;
  --color-text-secondary: #727272;
  --color-text-tertiary: #727272;
  --color-text-base-op-64: rgba(0, 0, 0, 0.64);
  --color-text-base-op-88: rgba(0, 0, 0, 0.88);
  --color-foreground: #000000;
  --color-success: #22c55e;
  --color-warning: #dc2626;
  --color-input-bg: #f9f9f9;
  --color-input-border: #e5e5e5;
  --color-icon-default: #000000;

  /* ── Dropdown (for Programmes nav dropdown) ── */
  --color-dropdown-bg: #ffffff;
  --color-dropdown-border: #e5e5e5;
  --color-dropdown-hover: #fff0e6;
  --color-dropdown-text: #000000;
  --color-dropdown-text-selected: #ff7500;

  /* Shadcn compat */
  --popover: #ffffff;
  --popover-foreground: #000000;
  --destructive: #dc2626;
}

/* Enforce the square Funtalks design system across all portal UI. */
.theme-funtalks,
.theme-funtalks *,
.theme-funtalks *::before,
.theme-funtalks *::after {
  border-radius: 0 !important;
}

/* Preserve circular brand portraits and media controls inside square UI system. */
.theme-funtalks .customer-care-portrait,
.theme-funtalks .funtalks-episode-play {
  border-radius: 9999px !important;
}

/* Cookie consent follows Funtalks' light, orange-accented website system. */
.theme-funtalks .cc-overlay {
  padding: 0 !important;
}

.theme-funtalks .cc-banner:not(.cc-settings-mode) {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 100px;
  margin: 0;
  padding: 18px 24px;
  gap: 24px;
  background: var(--funtalks-white) !important;
  color: #333333 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1) !important;
}

.theme-funtalks .cc-title {
  display: none;
}

.theme-funtalks .cc-description {
  max-width: 900px;
  margin: 0;
  color: #333333;
  font-size: 14px;
  line-height: 1.5;
  opacity: 1;
}

.theme-funtalks .cc-link,
.theme-funtalks .cc-config-link {
  color: var(--funtalks-link-text) !important;
  font-size: 14px;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.theme-funtalks .cc-banner:not(.cc-settings-mode) .cc-content {
  padding-bottom: 0;
}

.theme-funtalks .cc-banner:not(.cc-settings-mode) .cc-actions {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.theme-funtalks .cc-banner:not(.cc-settings-mode) .cc-config-link {
  position: static;
  display: inline;
  margin: 0;
  padding: 0 2px;
  vertical-align: baseline;
  line-height: inherit;
}

.theme-funtalks .cc-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 5px !important;
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.theme-funtalks .cc-btn-accept,
.theme-funtalks .cc-btn-essential {
  background: var(--funtalks-orange) !important;
  color: var(--funtalks-white) !important;
  border: 1px solid var(--funtalks-orange) !important;
}

.theme-funtalks .cc-btn-essential {
  order: 1;
  min-width: 160px;
}

.theme-funtalks .cc-btn-accept {
  order: 2;
  min-width: 176px;
}

.theme-funtalks .cc-settings-mode {
  max-width: 640px;
  background: var(--funtalks-white) !important;
  color: #333333 !important;
  border-color: var(--border) !important;
  border-radius: 6px !important;
  box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.14) !important;
}

@media (max-width: 767px) {
  .theme-funtalks .cc-banner:not(.cc-settings-mode) {
    min-height: 0;
    padding: 18px 16px;
    gap: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .theme-funtalks .cc-banner:not(.cc-settings-mode) .cc-content {
    padding-bottom: 0;
  }

  .theme-funtalks .cc-btn-essential,
  .theme-funtalks .cc-btn-accept {
    min-width: 0;
  }
}

/* ── Body defaults ── */
body {
  font-family: var(--font-family-body);
  background-color: var(--color-bg-base);
  color: var(--color-text-base);
}

/* Match the effective legacy Andromeda content grid. */
.page-container {
  max-width: 1140px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-display);
}

.funtalks-tagline {
  padding: 48px;
  color: var(--color-text-base);
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 23.4px;
}

@media (min-width: 768px) {
  .funtalks-tagline {
    padding: 60px;
    font-size: 29px;
    line-height: 37.7px;
  }
}

/* ── Global link color — accessible dark orange on white bg (contrast ~4.74:1, WCAG AA) ── */
a {
  color: var(--funtalks-link-text, #b85800);
}
a:hover {
  color: var(--funtalks-link-text, #b85800);
  text-decoration: underline;
}

/* Login uses the dedicated, minimal legacy composition at every viewport. */
body:has(.login-page) .funtalks-header {
  height: 65px !important;
  min-height: 65px !important;
  background: var(--funtalks-cobalt) !important;
  border-bottom: 0;
}

body:has(.login-page) .funtalks-header-inner,
body:has(.login-page) .funtalks-header-row {
  height: 65px !important;
}

body:has(.login-page) .funtalks-header-row {
  justify-content: center;
}

body:has(.login-page) .funtalks-header-row > button,
body:has(.login-page) .funtalks-header-lower,
body:has(.login-page) .funtalks-app-status {
  display: none !important;
}

body:has(.login-page) .login-page {
  min-height: calc(100svh - 175px);
  padding: 40px 16px 64px;
  box-sizing: border-box;
}

body:has(.login-page) .login-page-inner {
  max-width: 420px;
  gap: 0;
}

body:has(.login-page) .login-card .signup-form {
  gap: 20px;
}

body:has(.login-page) .login-card button[type="submit"] {
  height: 48px;
  margin-top: 0 !important;
  border-radius: 7px !important;
}

body:has(.login-page) .login-card .signup-form > div:last-child {
  margin-top: -4px;
  margin-bottom: 0;
}

body:has(.login-page) .login-card .signup-form > div:last-child a {
  color: var(--funtalks-cobalt) !important;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body:has(.login-page) footer {
  min-height: 110px;
}

body:has(.login-page) .funtalks-login-contact-link {
  display: inline;
}

/* ── Header overrides ── */
header {
  background-color: var(--header-bg) !important;
  color: var(--header-text);
  height: var(--header-h);
  min-height: var(--header-h);
  position: relative; /* non-sticky */
}

.funtalks-app-status {
  background: var(--funtalks-link-text);
  color: var(--funtalks-white) !important;
  font-family: var(--font-family-body);
  text-decoration: none !important;
}

.funtalks-app-status:hover {
  color: var(--funtalks-white) !important;
}

@media (max-width: 991px) {
  .funtalks-header {
    height: 61px !important;
    min-height: 61px !important;
  }

  .funtalks-header-inner,
  .funtalks-header-row {
    height: 61px !important;
  }

  .funtalks-app-status {
    display: none !important;
  }

  .funtalks-header > [role="navigation"] {
    position: fixed;
    top: 54.125px;
    left: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh !important;
  }

  .funtalks-header > [role="navigation"] > ul {
    padding-top: 41px;
  }
}

/* Desktop header from the Funtalks reference: centered logo in a compact
   cobalt band, then a full-width 48px navigation band. */
@media (min-width: 992px) {
  .funtalks-header {
    height: 109px !important;
    min-height: 109px !important;
    background: #cfd5f1 !important;
    border-bottom: 1px solid #bababa;
  }

  .funtalks-header-inner {
    width: 100%;
    max-width: none;
    height: 60px !important;
    background: var(--funtalks-cobalt);
  }

  .funtalks-header-row {
    height: 60px !important;
  }

  .funtalks-header-brand {
    justify-content: center;
  }

  .funtalks-header-brand img {
    width: 180px;
    height: auto;
  }

  .funtalks-header-lower {
    position: relative;
    height: 48px;
    border-color: #bababa;
    background: #cfd5f1;
  }

  .funtalks-header-auth {
    padding-right: 80px;
  }

  .funtalks-desktop-nav .funtalks-nav-link,
  .funtalks-header-auth .funtalks-nav-link {
    color: #757575 !important;
    background: transparent !important;
    font-family: var(--font-family-body);
    font-weight: 400;
    text-decoration: none;
  }

  .funtalks-desktop-nav .funtalks-nav-link:hover,
  .funtalks-desktop-nav .funtalks-nav-link[aria-current="page"],
  .funtalks-header-auth .funtalks-nav-link:hover {
    color: #ee7d30 !important;
    text-decoration: none;
  }
}

/* ── Funtalks nav links ── */
.funtalks-header-brand,
.funtalks-header-brand:hover {
  color: var(--funtalks-white) !important;
  text-decoration: none;
}

.funtalks-nav-link {
  color: var(--header-link-color);
  font-family: var(--font-family-display);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}
.funtalks-nav-link:hover,
.funtalks-nav-link[aria-current="page"] {
  color: var(--header-link-hover, #ffffff); /* white-on-blue: contrast ~5.8 (WCAG AA) */
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Footer link overrides ── */
/*
 * colour: #606060 on white = contrast 5.74:1 (WCAG AA ≥4.5). Matches legacy rgb(96,96,96).
 * font-family: Avenir-Book, matching legacy Andromeda footer.
 *   LinkLegal applies font-bricolage (Raleway) via @layer utilities; this rule is
 *   unlayered so it wins regardless of specificity.
 */
footer a,
footer button[data-variant="link"] {
  color: #606060;
  font-family: var(--font-family-body);
  /*
   * Legacy Andromeda uses:
   *   [data-andromeda-cmp=andromeda-cmp-footer] .footer_pages ul li a span {
   *     font-size: 12px; line-height: 1.625rem; font-weight: 300;
   *     text-decoration: none !important;
   *   }
   * We match that here so that footer link metrics (width, line-height) are
   * the same, enabling the footer to fit on one row at narrow viewports.
   * WCAG note: links in <nav aria-label=Liens légaux> are contextually
   * identifiable without underline; WCAG 1.4.1 is satisfied by context.
   */
  font-size: 0.75rem;                 /* 12 px — matches legacy span font-size */
  font-weight: 300;                   /* light — matches legacy span font-weight */
  line-height: 1.625rem;              /* 26 px — matches legacy span line-height */
  text-decoration: none !important;  /* matches legacy span text-decoration: none !important */
}
footer a:hover,
footer button[data-variant="link"]:hover {
  color: #333333;
}

/* ── Legal page: light theme override ── */
.legal-page-container {
  background-color: #ffffff;
  color: #000000;
}
.legal-page-container h1,
.legal-page-container h2 {
  color: var(--funtalks-cobalt);
}

/* ── Cookie consent accent ── */
.cc-btn-accept,
.cookie-consent-accept {
  background-color: var(--funtalks-orange) !important;
  border-color: var(--funtalks-orange) !important;
}

/* ── Button primary ── */
[data-variant="default"] {
  background-color: var(--funtalks-orange);
  color: #ffffff;
}
[data-variant="default"]:hover:not(:disabled) {
  background-color: var(--primary-600);
}

/* ── Header search ── */
.funtalks-legacy-search {
  position: absolute;
  top: 3px;
  right: 24px;
  z-index: 61;
  width: 0;
  height: 42px;
  font-family: var(--font-family-body);
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.funtalks-legacy-search.is-open {
  z-index: 100;
  width: min(330px, calc(100vw - 48px));
  isolation: isolate;
}

.funtalks-search-trigger {
  position: absolute;
  top: 1px;
  right: -8px;
  z-index: 63;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.funtalks-search-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
}

.funtalks-search-trigger:active {
  transform: scale(0.92);
}

.funtalks-search-trigger:focus-visible,
.funtalks-search-close:focus-visible {
  outline: 2px solid var(--funtalks-orange);
  outline-offset: 2px;
}

.funtalks-search-bar-container,
.funtalks-search-bar-container form {
  position: relative;
  width: 100%;
  height: 42px;
}

.funtalks-search-bar-container {
  z-index: 1;
  isolation: isolate;
}

.funtalks-search-input {
  position: relative;
  z-index: 61;
  display: inline-block;
  width: 100%;
  height: 42px;
  padding: 6px 46px 6px 40px;
  border: 1px solid transparent;
  border-radius: 7px !important;
  outline: 0;
  background: var(--funtalks-cobalt);
  color: #ffffff;
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 20.8px;
  box-shadow: 0 8px 24px rgba(20, 34, 126, 0.18);
  appearance: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.funtalks-search-input::-webkit-search-cancel-button {
  display: none;
}

.funtalks-search-input::placeholder {
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.funtalks-search-input:focus {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 3px rgba(48, 76, 245, 0.2),
    0 10px 28px rgba(20, 34, 126, 0.22);
}

.funtalks-search-input-icon {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 62;
  display: flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
}

.funtalks-search-input-icon > svg {
  animation: funtalks-search-icon-in 140ms ease-out both;
}

.funtalks-search-spinner-track,
.funtalks-search-spinner-head {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.funtalks-search-spinner-track {
  opacity: 0.25;
}

.funtalks-search-spinner-head {
  stroke-linecap: round;
}

.is-searching .funtalks-search-input-icon svg,
.funtalks-search-feedback.is-loading svg {
  animation: funtalks-search-spin 700ms linear infinite;
}

.funtalks-search-close {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 64;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.funtalks-search-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.funtalks-search-close:active {
  transform: scale(0.9);
}

.funtalks-search-results {
  position: absolute;
  top: 47px;
  left: 0;
  z-index: 99;
  width: 100%;
  max-height: calc(100vh - 120px);
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(48, 76, 245, 0.12);
  border-radius: 8px !important;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(20, 34, 126, 0.2);
  animation: funtalks-search-dropdown-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  scrollbar-color: rgba(48, 76, 245, 0.34) transparent;
  scrollbar-width: thin;
}

.funtalks-search-results-options {
  margin: 0;
  padding: 0;
  list-style: none;
}

.funtalks-search-results-options .content-title {
  border-radius: 5px;
  font-family: var(--font-family-body);
  font-size: 15px;
  line-height: 20px;
  transition: background-color 120ms ease;
}

.funtalks-search-results-options .content-title + .content-title {
  margin-top: 2px;
}

.funtalks-search-results-options .content-title:hover,
.funtalks-search-results-options .content-title[aria-selected="true"] {
  background: rgba(48, 76, 245, 0.09);
}

.funtalks-search-results-options .content-title a {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: #333b59 !important;
  text-decoration: none !important;
}

.funtalks-search-results-options .content-title a > svg {
  width: 16px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--funtalks-cobalt);
  opacity: 0.58;
}

.funtalks-search-results-options .content-title a > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funtalks-search-feedback {
  min-height: 44px;
  padding: 11px 12px;
  color: #747a8f;
  font-family: var(--font-family-body);
  font-size: 14px;
  line-height: 20px;
}

.funtalks-search-feedback.is-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4e5778;
}

.funtalks-search-feedback.is-loading svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--funtalks-cobalt);
}

.funtalks-search-feedback.is-error {
  color: #9b2c2c;
}

.funtalks-search-veil {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(13, 20, 66, 0.34);
  cursor: default;
  animation: funtalks-search-veil-in 180ms ease-out both;
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

.funtalks-legacy-search.is-mobile {
  position: relative;
  inset: auto;
  z-index: 61;
  width: 100%;
  height: 42px;
  transition: none;
}

.funtalks-legacy-search.is-mobile .funtalks-search-bar-container {
  z-index: auto;
  isolation: auto;
}

.funtalks-legacy-search.is-mobile .funtalks-search-input {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.funtalks-legacy-search.is-mobile .funtalks-search-input-icon {
  color: rgba(255, 255, 255, 0.74);
}

.funtalks-legacy-search.is-mobile .funtalks-search-results {
  max-height: calc(100dvh - 150px);
}

@keyframes funtalks-search-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes funtalks-search-icon-in {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes funtalks-search-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes funtalks-search-veil-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .funtalks-legacy-search,
  .funtalks-search-bar-container,
  .funtalks-search-results,
  .funtalks-search-trigger,
  .funtalks-search-close,
  .funtalks-search-input-icon > svg,
  .funtalks-search-veil {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Exact search geometry overrides. Keep after enhancement rules so these
   desktop positioning values win without affecting unrelated header controls. */
.funtalks-legacy-search {
  top: 3px;
  right: 24px;
  width: 0;
  height: 42px;
  transition: none;
}

.funtalks-legacy-search.is-open {
  width: 330.078125px;
}

.funtalks-search-trigger {
  top: 8.875px;
  right: 0;
  display: block;
  width: 24px;
  height: 24.25px;
  border-radius: 0;
  color: #757575;
  transition: none;
}

.funtalks-search-trigger:hover,
.funtalks-search-trigger:active {
  background: transparent;
  transform: none;
}

.funtalks-search-bar-container {
  transform-origin: right center;
  animation: funtalks-search-bar-in 220ms cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

.funtalks-legacy-search.is-closing .funtalks-search-bar-container {
  opacity: 0;
  transform: translateX(12px) scaleX(0.92);
  animation: none;
  transition:
    opacity 180ms ease-in,
    transform 220ms cubic-bezier(0.4, 0, 1, 1);
}

.funtalks-search-input {
  padding: 6px 36px 6px 14px;
  border: 1px inset transparent;
  border-radius: 2px !important;
  box-shadow: none;
  appearance: auto;
  transition: none;
}

.funtalks-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.funtalks-search-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.funtalks-search-input-icon {
  top: 10px;
  left: 6px;
  display: block;
  width: 24px;
  height: 30px;
  color: #000000;
}

.funtalks-search-input-icon > svg {
  animation: none;
}

.funtalks-search-close {
  top: 12px;
  right: 12px;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 0;
  color: #000000;
  transition: none;
}

.funtalks-search-close:hover,
.funtalks-search-close:active {
  background: transparent;
  transform: none;
}

.funtalks-search-results {
  top: 47px;
  max-height: calc(100vh - 116px);
  padding: 6px 0;
  overflow: auto scroll;
  border: 0;
  border-radius: 2px !important;
  box-shadow: rgba(0, 0, 0, 0.09) 0 0 1px 1px;
  animation: funtalks-search-dropdown-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.funtalks-search-results.is-closing {
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  animation: none;
  pointer-events: none;
  transition:
    opacity 150ms ease-in,
    transform 180ms cubic-bezier(0.4, 0, 1, 1);
}

.funtalks-search-results-options,
.funtalks-search-no-results-options {
  margin: 0;
  list-style: none;
}

.funtalks-search-results-options {
  padding: 0;
  animation: funtalks-search-list-in 220ms 40ms cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

.funtalks-search-results-options .content-title {
  border-radius: 0;
  font-size: 16px;
  line-height: 20.8px;
  transition: none;
}

.funtalks-search-results-options .content-title + .content-title {
  margin-top: 0;
}

.funtalks-search-results-options .content-title:hover {
  background: transparent;
}

.funtalks-search-results-options .content-title a,
.funtalks-search-results-options .content-title a:hover,
.funtalks-search-results-options .content-title a:focus {
  display: block;
  min-height: 0;
  padding: 6px 16px;
  color: #4a4a4a !important;
}

.funtalks-search-no-results-options {
  padding: 6px 16px;
  color: #bfbfbf;
  font-size: 16px;
  line-height: 20.8px;
  animation: funtalks-search-list-in 180ms ease-out both;
}

@keyframes funtalks-search-bar-in {
  from {
    opacity: 0;
    transform: translateX(12px) scaleX(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scaleX(1);
  }
}

@keyframes funtalks-search-list-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.funtalks-search-veil {
  background: rgba(0, 0, 0, 0.39);
  animation: funtalks-search-veil-in 180ms ease-out both;
  backdrop-filter: none;
  transition: opacity 180ms ease-in;
}

.funtalks-search-veil.is-closing {
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 992px) {
  .funtalks-search-veil {
    top: 109px;
  }
}

.funtalks-legacy-search.is-mobile {
  width: 100%;
  height: 42px;
}

.funtalks-legacy-search.is-mobile .funtalks-search-input {
  border-color: #ffffff;
}

.funtalks-legacy-search.is-mobile .funtalks-search-input-icon {
  color: #bfbfbf;
}

@media (prefers-reduced-motion: reduce) {
  .funtalks-search-bar-container,
  .funtalks-search-results,
  .funtalks-search-results-options,
  .funtalks-search-no-results-options,
  .funtalks-search-feedback.is-loading svg {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Episode detail ── */
.funtalks-episode-detail {
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #2a2a2a;
}

.funtalks-detail-hero {
  display: grid;
  grid-template-columns: minmax(190px, 232px) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  padding: 12px;
  border-radius: 0 !important;
  background: #ffffff;
}

.funtalks-detail-cover {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 15px !important;
  background: #dfe3f2;
  box-shadow: 0 10px 28px rgba(30, 43, 107, 0.14);
}

.funtalks-detail-cover img,
.funtalks-related-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.funtalks-detail-cover img {
  border-radius: 15px !important;
}

.funtalks-detail-heading {
  min-width: 0;
}

.funtalks-detail-heading h1 {
  margin: 0;
  color: #2a2a2a;
  font-family: var(--font-family-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700 !important;
  line-height: 1.15;
  text-wrap: balance;
}

.funtalks-detail-heading p {
  margin: 14px 0 0;
  color: #555b68;
  font-family: var(--font-family-body);
  font-size: 17px;
  line-height: 1.45;
}

.funtalks-detail-player {
  padding: 0 12px;
}

.theme-funtalks .funtalks-detail-player .funtalks-audio-player {
  height: 128px !important;
  min-height: 128px !important;
  border: 0 !important;
  box-shadow: none;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-controls"] {
  display: grid;
  grid-template-areas:
    "back play forward spacer sleep"
    "seek seek seek seek seek"
    "time time time time time";
  grid-template-columns: 44px 48px 44px minmax(0, 1fr) auto;
  grid-template-rows: 48px 8px 20px;
  gap: 8px 12px;
  padding: 12px 16px;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-play-button"] {
  grid-area: play;
  width: 48px;
  height: 48px;
  border-radius: 9999px !important;
  background: var(--funtalks-orange);
  color: #ffffff;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-backward"],
.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-forward"] {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px !important;
  background: transparent;
  color: #4356a6;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-seek-backward"],
    [data-slot="media-player-seek-forward"]
  ):hover {
  background: rgba(67, 86, 166, 0.1);
  color: #4356a6;
}

.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-seek-backward"],
    [data-slot="media-player-seek-forward"]
  ):active {
  transform: scale(0.94);
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-backward"] {
  grid-area: back;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-forward"] {
  grid-area: forward;
}

/* Circular-arrow ring icon (drawn via mask) + centered "30" label */
.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-seek-backward"],
    [data-slot="media-player-seek-forward"]
  )::before {
  content: "";
  position: absolute;
  inset: 4px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-forward"]::before {
  transform: scaleX(-1);
}

.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-seek-backward"],
    [data-slot="media-player-seek-forward"]
  )::after {
  content: "30";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  color: currentColor;
  font-family: var(--font-family-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-seek-backward"],
    [data-slot="media-player-seek-forward"]
  )
  svg {
  display: none;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-sleep-timer"] {
  grid-area: sleep;
  justify-self: end;
}

.theme-funtalks
  .funtalks-detail-player
  :is(
    [data-slot="media-player-sleep-timer-trigger"],
    [data-slot="media-player-sleep-timer-toggle"]
  ) {
  width: 38px;
  height: 38px;
  border: 1.5px solid #4356a6;
  border-radius: 9999px !important;
  color: #4356a6;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-sleep-timer-toggle"][data-state="on"] {
  border-color: #c9cdf0;
  background: #e8eafd;
  color: #4356a6;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek-container"] {
  grid-area: seek;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-seek"]
  > span:first-child {
  height: 4px;
  background: #e2e3e8;
}

.theme-funtalks
  .funtalks-detail-player
  [data-slot="media-player-time"] {
  grid-area: time;
  justify-self: start;
  color: #45464d;
  font-size: 13px;
}

.funtalks-detail-synopsis {
  padding: 0 12px;
}

.funtalks-detail-synopsis h2,
.funtalks-related h2 {
  margin: 0;
  color: #2a2a2a;
  font-family: var(--font-family-display);
  font-weight: 700 !important;
}

.funtalks-detail-synopsis h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

.funtalks-detail-synopsis-copy {
  position: relative;
  overflow: hidden;
  color: #333741;
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 1.65;
  transition: max-height 240ms ease;
}

.funtalks-detail-synopsis-copy.is-collapsed {
  max-height: 54px;
}

.funtalks-detail-synopsis-copy.is-collapsed.is-clipped {
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.funtalks-detail-synopsis button {
  margin-top: 8px;
  padding: 0;
  color: var(--funtalks-orange);
  font-family: var(--font-family-body);
  font-size: 15px;
  font-weight: 600;
}

.funtalks-detail-synopsis button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.funtalks-detail-back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: 0 12px;
  color: #3e4149 !important;
  font-family: var(--font-family-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none !important;
  text-transform: uppercase;
}

.funtalks-detail-back-link svg {
  width: 17px;
  height: 17px;
  color: var(--funtalks-orange);
}

.funtalks-detail-back-link:hover {
  color: var(--funtalks-orange) !important;
}

.funtalks-related {
  position: relative;
  padding: 4px 12px 8px;
}

.funtalks-related-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.funtalks-related h2 {
  font-size: clamp(25px, 2.4vw, 30px);
}

.funtalks-related-actions {
  display: flex;
  gap: 8px;
}

.funtalks-related-actions button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 117, 0, 0.32);
  border-radius: 9999px !important;
  color: var(--funtalks-orange);
  transition: background-color 150ms ease, color 150ms ease;
}

.funtalks-related-actions button:hover {
  background: var(--funtalks-orange);
  color: #ffffff;
}

.funtalks-related-actions svg {
  width: 20px;
  height: 20px;
}

.funtalks-related-track {
  display: grid;
  grid-auto-columns: calc((100% - 44px) / 3);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.funtalks-related-track::-webkit-scrollbar {
  display: none;
}

.funtalks-related-card {
  min-width: 0;
  color: #2a2a2a !important;
  text-decoration: none !important;
  scroll-snap-align: start;
}

.funtalks-related-image {
  display: grid;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border-radius: 15px !important;
  background: #eef0f7;
}

.funtalks-related-image img {
  border-radius: 15px !important;
  transition: transform 240ms ease;
}

.funtalks-related-image > svg {
  width: 42px;
  height: 42px;
  color: #8b92ac;
}

.funtalks-related-card:hover .funtalks-related-image img {
  transform: scale(1.025);
}

.funtalks-related-card h3 {
  margin: 11px 2px 0;
  color: #2a2a2a;
  font-family: var(--font-family-body);
  font-size: 16px;
  font-weight: 700 !important;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .funtalks-episode-detail {
    gap: 22px;
  }

  .funtalks-detail-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .funtalks-detail-cover {
    width: min(72vw, 240px);
    margin-inline: auto;
  }

  .funtalks-detail-heading {
    text-align: center;
  }

  .funtalks-detail-heading h1 {
    font-size: 27px;
  }

  .funtalks-detail-heading p {
    margin-top: 9px;
    font-size: 15px;
  }

  .funtalks-detail-player,
  .funtalks-detail-synopsis,
  .funtalks-related {
    padding-inline: 0;
  }

  .funtalks-detail-back-link {
    margin-inline: 0;
  }

  .funtalks-related-track {
    grid-auto-columns: min(82%, 290px);
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .funtalks-detail-synopsis-copy,
  .funtalks-related-actions button,
  .funtalks-related-image img {
    transition: none;
  }

  .funtalks-related-track {
    scroll-behavior: auto;
  }
}

/* ── Audio player ── */
.theme-funtalks .funtalks-audio-player {
  overflow: hidden;
  border: 1px solid rgba(48, 76, 245, 0.14) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 6px 20px rgba(20, 34, 126, 0.1);
}

.theme-funtalks
  .funtalks-audio-player
  :is(
    [data-slot="media-player-play-button"],
    [data-slot="media-player-volume-trigger"],
    [data-slot="media-player-loop"],
    [role="slider"]
  ) {
  border-radius: 9999px !important;
}

.theme-funtalks .funtalks-audio-player [role="slider"] {
  box-shadow: 0 1px 4px rgba(20, 34, 126, 0.28);
}

.theme-funtalks
  .funtalks-audio-player:has([data-slot="media-player-error"])
  [data-slot="media-player-controls"] {
  display: none;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"] {
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 16px;
  border: 0 !important;
  border-radius: 11px !important;
  background: linear-gradient(90deg, #fff7f0 0%, #ffffff 100%);
  color: #212126;
  backdrop-filter: none;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  > div {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0;
  text-align: left;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  > div
  > svg {
  width: 22px;
  height: 22px;
  color: var(--funtalks-orange);
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  > div
  > div:nth-child(2) {
  min-width: 0;
  text-align: left;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  h3 {
  overflow: hidden;
  color: #30313a;
  font-family: var(--font-family-body);
  font-size: 0;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  h3::after {
  content: "Format audio indisponible";
  font-size: 14px;
}

.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  p,
.theme-funtalks
  .funtalks-audio-player
  [data-slot="media-player-error"]
  > div
  > div:last-child {
  display: none;
}

/* ── Account actions ── */
.funtalks-account-button {
  background: #ff7500;
  border: 0;
  border-radius: 6px !important;
  letter-spacing: 0.08em;
  color: var(--funtalks-white) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.funtalks-account-button:hover {
  background: var(--funtalks-cobalt);
  border-color: var(--funtalks-cobalt);
  color: var(--funtalks-white) !important;
  text-decoration: none !important;
}

.funtalks-account-button-secondary {
  background: transparent;
  border-color: transparent;
  color: #ff7500 !important;
  box-shadow: none;
}

.funtalks-account-button-secondary:hover {
  background: var(--funtalks-white);
  border-color: var(--funtalks-cobalt);
  color: var(--funtalks-cobalt) !important;
}

.funtalks-account-button:focus-visible {
  outline: 2px solid var(--funtalks-cobalt);
  outline-offset: 2px;
}

/* ── Contact form ── */
.funtalks-contact-page form button[type="submit"] {
  width: min(100%, 240px) !important;
  margin-right: auto;
  margin-left: auto;
  background: var(--funtalks-orange) !important;
  border-radius: 6px !important;
  text-transform: uppercase;
}

.funtalks-contact-page form button[type="submit"]:hover:not(:disabled) {
  background: var(--primary-600) !important;
}

/* Phone button (SDK ContactForm): the global `a { color }` rule is unlayered and
   beats the SDK's `text-white` utility, leaving dark orange text on the orange
   background. Keep it white, like the submit button. */
.funtalks-contact-page a[href^="tel:"],
.funtalks-contact-page a[href^="tel:"]:hover {
  color: var(--funtalks-white) !important;
  text-decoration: none;
}

.funtalks-contact-page a[href*="sac-fr"] {
  color: var(--funtalks-link-text) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── SDK PasswordReset overrides (light theme) ── */
.pr-page {
  background-color: #ffffff;
  color: #000000;
}
.pr-card {
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  max-width: 480px;
}
.pr-title {
  color: #000000;
  font-size: 24px;
  font-weight: 700;
}
.pr-subtitle {
  color: #727272;
}
.pr-label {
  color: #000000;
}
.pr-input {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  color: #000000;
  border-radius: 8px;
}
.pr-input:focus {
  border-color: var(--funtalks-orange);
  outline: none;
}
.pr-btn {
  background-color: var(--funtalks-orange) !important;
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 700;
}
.pr-btn:hover:not(:disabled) {
  background-color: var(--primary-600) !important;
}
.pr-error-msg {
  color: #dc2626;
}
.pr-success-text {
  color: #000000;
}
.pr-logo {
  max-height: 48px;
}

/* ── Dark listing page (/originals): blue footer with white content ── */
body:has([data-dark-listing]) footer {
  --footer-bg: var(--funtalks-cobalt);
  --footer-border: rgba(255, 255, 255, 0.2);
  --footer-text: #ffffff;
  --footer-link: #ffffff;
  --footer-link-hover: rgba(255, 255, 255, 0.8);
}
body:has([data-dark-listing]) footer,
body:has([data-dark-listing]) footer a,
body:has([data-dark-listing]) footer button[data-variant="link"] {
  color: #ffffff !important;
}
body:has([data-dark-listing]) footer img {
  filter: brightness(0) invert(1);
}
