:root {
  --tqpp-bg: #fff;
  --tqpp-text: #050505;
  --tqpp-muted: #303030;
  --tqpp-divider: #111;
  --tqpp-button-bg: #082f49;
  --tqpp-button-text: #fff;
  --tqpp-overlay: rgba(0, 0, 0, .52);
  --tqpp-width: 1060px;
  --tqpp-card-gap: 28px;
  --tqpp-platform-gap: 27px;
  --tqpp-shadow: 0 0 7px 0 rgba(91, 98, 107, .3);
}

.tqpp-card *,
.tqpp-sticky *,
.tqpp-transcript * {
  box-sizing: border-box;
}

.tqpp-card button,
.tqpp-card a,
.tqpp-sticky button,
.tqpp-sticky a {
  font: inherit;
}

/* Los enlaces de ambos widgets nunca muestran underline. */
.tqpp-card a,
.tqpp-card a:hover,
.tqpp-card a:focus,
.tqpp-card a:visited,
.tqpp-sticky a,
.tqpp-sticky a:hover,
.tqpp-sticky a:focus,
.tqpp-sticky a:visited {
  text-decoration: none !important;
}

/* =========================================================
   BLOQUE GRANDE
   ========================================================= */
.tqpp-card {
  display: flex;
  width: min(100%, var(--tqpp-width));
  max-height: 390px;
  align-items: center;
  gap: var(--tqpp-card-gap);
  padding: 28px 32px;
  overflow: hidden;
  color: var(--tqpp-text);
  background-color: var(--tqpp-sticky-bg-color, var(--tqpp-bg));
  box-shadow: var(--tqpp-shadow);
}

.tqpp-card__cover {
  display: var(--tqpp-image-display, block);
  flex: 0 0 230px;
  width: 230px;
  height: 230px;
  overflow: hidden;
}

.tqpp-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tqpp-card__body {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

/* Cabecera: podcast a la izquierda y episodio SIEMPRE a la derecha. */
.tqpp-card__header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tqpp-card__podcast {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.tqpp-card__podcast-icon {
  flex: 0 0 auto;
  font-size: 48px;
  line-height: 1;
}

.tqpp-card__podcast-name {
  max-width: 240px;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--tqpp-divider);
  font-size: 23px;
  line-height: 1.2;
  text-transform: uppercase;
}

.tqpp-card__episode {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--tqpp-button-text);
  background: var(--tqpp-button-bg);
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
}

.tqpp-card__title {
  display: -webkit-box;
  margin: var(--tqpp-title-space-top, 14px) 0 var(--tqpp-title-space-bottom, 18px);
  overflow: hidden;
  color: var(--tqpp-text);
  font-size: clamp(38px, 3vw, 54px);
  font-weight: 400;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Pie: Play a la izquierda, plataformas a la derecha. */
.tqpp-card__footer {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0;
}

.tqpp-card__play-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

/* =========================================================
   PLAY GRANDE
   Sin tamaño de botón: su tamaño depende del contenido + padding.
   ========================================================= */
.tqpp-card__play {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: auto;
  height: auto;
  min-width: 0;
  padding: var(--tqpp-play-padding, 14px 27px);
  border: 0;
  border-radius: var(--tqpp-play-radius, 0);
  color: var(--tqpp-button-text);
  background: var(--tqpp-button-bg);
  cursor: pointer;
  font-size: 31px;
  line-height: 1;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-card__play-icon {
  flex: 0 0 auto;
  font-size: var(--tqpp-play-icon-size, 27px) !important;
  line-height: 1;
}

.tqpp-card__play-labels {
  display: grid;
  align-items: center;
}

.tqpp-card__play-label {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.tqpp-card__play-label--play {
  visibility: visible;
}

.tqpp-card__play-label--pause {
  visibility: hidden;
}

.tqpp-card__play.is-playing .tqpp-card__play-label--play {
  visibility: hidden;
}

.tqpp-card__play.is-playing .tqpp-card__play-label--pause {
  visibility: visible;
}

/* =========================================================
   PLATAFORMAS + TRANSCRIPCIÓN
   Los cuatro botones usan EXACTAMENTE la misma regla.
   ========================================================= */
.tqpp-card__platforms {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--tqpp-platform-gap);
  margin-left: auto;
}

.tqpp-card__icon-button {
  display: inline-flex;
  flex: 0 0 var(--tqpp-action-button-size, 60px);
  width: var(--tqpp-action-button-size, 60px);
  height: var(--tqpp-action-button-size, 60px);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--tqpp-action-radius, 0);
  color: var(--tqpp-button-text);
  background: var(--tqpp-button-bg);
  cursor: pointer;
  font-size: var(--tqpp-action-icon-size, 28px);
  line-height: 1;
  text-decoration: none !important;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-card__icon-button > span {
  font-size: var(--tqpp-action-icon-size, 28px) !important;
  line-height: 1;
}

.tqpp-card__transcript {
  margin-left: calc(var(--tqpp-platform-gap) * 2);
}

/* =========================================================
   POPUP TRANSCRIPCIÓN
   ========================================================= */
.tqpp-transcript {
  width: min(760px, calc(100% - 32px));
  max-height: min(82vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--tqpp-bg);
  color: var(--tqpp-text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

.tqpp-transcript::backdrop {
  background: var(--tqpp-overlay);
}

.tqpp-transcript__panel {
  display: flex;
  max-height: min(82vh, 760px);
  flex-direction: column;
}

.tqpp-transcript__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.tqpp-transcript__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--tqpp-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tqpp-transcript__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.tqpp-transcript__close {
  display: inline-flex;
  flex: 0 0 var(--tqpp-popup-close-button-size, 40px);
  width: var(--tqpp-popup-close-button-size, 40px);
  height: var(--tqpp-popup-close-button-size, 40px);
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0;
  border-radius: var(--tqpp-popup-close-radius, 0);
  color: var(--tqpp-button-text);
  background: var(--tqpp-button-bg);
  cursor: pointer;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-transcript__close > span {
  font-size: var(--tqpp-popup-close-icon-size, 16px) !important;
  line-height: 1;
}

.tqpp-transcript__content {
  overflow: auto;
  padding: 24px;
  font-size: 16px;
  line-height: 1.7;
}

.tqpp-transcript__content > :first-child {
  margin-top: 0;
}

.tqpp-transcript__content > :last-child {
  margin-bottom: 0;
}

.tqpp-transcript__content img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   REPRODUCTOR PEQUEÑO
   ========================================================= */
.tqpp-sticky {
  position: fixed;
  z-index: 99;
  left: var(--tqpp-fixed-left, 0px);
  right: auto;
  bottom: -150px;
  display: flex;
  width: var(--tqpp-fixed-width, 100%);
  max-width: none;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  transform: none;
  color: var(--tqpp-text);
  background: var(--tqpp-bg);
  box-shadow: var(--tqpp-shadow);
  transition: bottom 250ms ease;
}

.tqpp-sticky.is-visible {
  bottom: 12px;
}

/*
 * El sentinel permanece en la ubicación real del widget dentro del footer.
 * Mientras esa ubicación no alcanza el reproductor, el section es fixed.
 * Al alcanzarla, JS añade .is-docked y el reproductor vuelve al flujo normal.
 */
.tqpp-sticky__dock-sentinel {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.tqpp-sticky.is-docked {
  position: relative;
  z-index: 99;
  left: auto;
  right: auto;
  bottom: auto !important;
  width: 100%;
  max-width: none;
}

/* Si se cierra mientras estaba acoplado, no deja un bloque visible vacío. */
.tqpp-sticky.is-docked:not(.is-visible) {
  display: none;
}

/* GlassMorphismo aplicado directamente al SECTION del reproductor. */
.tqpp-sticky.tqpp-sticky--glass {
  /*
   * La transparencia afecta SOLO al fondo.
   * Los textos, iconos, imágenes y botones conservan opacidad 100%.
   */
  background-color: color-mix(
    in srgb,
    var(--tqpp-sticky-bg-color, var(--tqpp-bg))
      calc(100% - var(--tqpp-glass-transparency, 25%)),
    transparent
  );
  backdrop-filter: blur(var(--tqpp-glass-blur, 5px));
  -webkit-backdrop-filter: blur(var(--tqpp-glass-blur, 5px));
}

.tqpp-sticky__close {
  position: absolute;
  top: calc(var(--tqpp-sticky-close-button-size, 40px) / -2);
  right: 12px;
  display: inline-flex;
  flex: 0 0 var(--tqpp-sticky-close-button-size, 40px);
  width: var(--tqpp-sticky-close-button-size, 40px);
  height: var(--tqpp-sticky-close-button-size, 40px);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--tqpp-sticky-close-radius, 0);
  color: var(--tqpp-button-text);
  background: var(--tqpp-button-bg);
  cursor: pointer;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-sticky__close > span {
  font-size: var(--tqpp-sticky-close-icon-size, 18px) !important;
  line-height: 1;
}

.tqpp-sticky__controls,
.tqpp-sticky__platforms {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.tqpp-sticky__controls {
  gap: var(--tqpp-sticky-controls-gap, 12px);
}

.tqpp-sticky__control {
  display: inline-flex;
  flex: 0 0 var(--tqpp-sticky-seek-button-size, 44px);
  width: var(--tqpp-sticky-seek-button-size, 44px);
  height: var(--tqpp-sticky-seek-button-size, 44px);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--tqpp-sticky-seek-radius, 0);
  color: var(--tqpp-text);
  background: transparent;
  cursor: pointer;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-sticky__control:not(.tqpp-sticky__control--play) > span {
  font-size: var(--tqpp-sticky-seek-icon-size, 37px) !important;
  line-height: 1;
}

.tqpp-sticky__control--play {
  flex-basis: var(--tqpp-sticky-play-button-size, 54px);
  width: var(--tqpp-sticky-play-button-size, 54px);
  height: var(--tqpp-sticky-play-button-size, 54px);
  border-radius: var(--tqpp-sticky-play-radius, 0);
}

.tqpp-sticky__control--play > span {
  font-size: var(--tqpp-sticky-play-icon-size, 48px) !important;
  line-height: 1;
}

.tqpp-sticky__cover {
  display: var(--tqpp-sticky-image-display, block);
  margin-left: 12px;
  flex: 0 0 86px;
  width: 86px;
  height: 86px;
  overflow: hidden;
}

.tqpp-sticky__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tqpp-sticky__meta {
  flex: 1 1 auto;
  min-width: 0;
}

.tqpp-sticky__title {
  overflow: hidden;
  color: var(--tqpp-text);
  font-size: 28px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tqpp-sticky__subtitle {
  display: flex;
  gap: .35em;
  margin-top: 5px;
  overflow: hidden;
  color: var(--tqpp-muted);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tqpp-sticky__podcast-name,
.tqpp-sticky__episode {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tqpp-sticky__podcast-name {
  flex: 0 1 auto;
}

.tqpp-sticky__episode {
  flex: 0 0 auto;
}

.tqpp-sticky__separator {
  line-height: 0;
  align-self: center;
}

.tqpp-sticky__platforms {
  gap: var(--tqpp-sticky-platform-gap, 28px);
  margin-left: 14px;
  padding-right: 6px;
}

.tqpp-sticky__platform {
  display: inline-flex;
  flex: 0 0 var(--tqpp-sticky-platform-button-size, 48px);
  width: var(--tqpp-sticky-platform-button-size, 48px);
  height: var(--tqpp-sticky-platform-button-size, 48px);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--tqpp-sticky-platform-radius, 0);
  color: var(--tqpp-text);
  background: transparent;
  text-decoration: none !important;
  transition:
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.tqpp-sticky__platform > span {
  font-size: var(--tqpp-sticky-platform-icon-size, 28px) !important;
  line-height: 1;
}

.tqpp-sticky__platform[hidden],
.tqpp-sticky__cover[hidden] {
  display: none !important;
}

/* Editor Elementor */
.elementor-editor-active .tqpp-sticky,
.elementor-editor-preview .tqpp-sticky {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto !important;
  width: 100%;
  margin: 40px auto 0;
  transform: none;
}

.elementor-editor-active .tqpp-sticky__dock-sentinel,
.elementor-editor-preview .tqpp-sticky__dock-sentinel {
  display: none;
}

/* =========================================================
   TABLET
   ========================================================= */
@media (min-width: 768px) and (max-width: 1199px) {
  .tqpp-card {
    gap: 20px;
    padding: 24px;
  }

  .tqpp-card__cover {
    flex-basis: 190px;
    width: 190px;
    height: 190px;
  }

  .tqpp-card__body {
  }

  .tqpp-card__podcast-icon {
    font-size: 38px;
  }

  .tqpp-card__podcast-name {
    max-width: 200px;
    font-size: 17px;
  }

  .tqpp-card__episode {
    padding: 8px 14px;
    font-size: 16px;
  }

  .tqpp-card__title {
    font-size: clamp(29px, 3.9vw, 42px);
  }

  .tqpp-card__play {
    gap: 14px;
    font-size: 23px;
  }

  .tqpp-sticky {
    gap: 12px;
    padding-inline: 14px;
  }



  .tqpp-sticky__cover {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .tqpp-sticky__title {
    font-size: 21px;
  }

  .tqpp-sticky__subtitle {
    font-size: 13px;
  }

  .tqpp-sticky__platforms {
    margin-left: 4px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 767px) {
  .tqpp-card {
    width: 100%;
    max-height: 390px;
    gap: 0;
    padding: 18px 16px;
  }

  /* La imagen grande continúa oculta en móvil. */
  .tqpp-card__cover {
    display: none;
  }

  .tqpp-card__body {
    width: 100%;
    gap: 14px;
  }

  .tqpp-card__header {
    gap: 16px;
  }

  .tqpp-card__podcast {
    gap: 8px;
  }

  .tqpp-card__podcast-icon {
    font-size: 28px;
  }

  .tqpp-card__podcast-name {
    max-width: 150px;
    padding-left: 8px;
    font-size: 13px;
    line-height: 1.15;
  }

  .tqpp-card__episode {
    padding: 6px 9px;
    font-size: 12px;
  }

  .tqpp-card__title {
    font-size: clamp(22px, 6.2vw, 28px);
    line-height: 1.15;
  }

  /* Play ocupa una fila completa de layout, sin estirarse. */
  .tqpp-card__footer {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .tqpp-card__play-row {
    flex: 0 0 100%;
    width: 100%;
  }

  .tqpp-card__play {
    flex: 0 0 auto;
    width: auto;
    gap: 8px;
    font-size: 16px;
  }

  /* Segunda fila: plataformas a la izquierda y transcripción al extremo derecho. */
  .tqpp-card__platforms {
    margin-top: 24px;
    margin-left: 0;
  }

  .tqpp-card__transcript {
    margin-top: 24px;
    margin-left: auto;
  }

  .tqpp-transcript {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 48px);
    border-radius: 14px;
  }

  .tqpp-transcript__panel {
    max-height: calc(100dvh - 48px);
  }

  .tqpp-transcript__header {
    gap: 14px;
    padding: 18px 16px 14px;
  }

  .tqpp-transcript__eyebrow {
    font-size: 11px;
  }

  .tqpp-transcript__title {
    font-size: 23px;
  }

  .tqpp-transcript__content {
    padding: 18px 16px 22px;
    font-size: 15px;
    line-height: 1.65;
  }

  .tqpp-sticky {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 9px 10px;
  }

  .tqpp-sticky__cover {
    order: 1;
    width: 58px;
    margin-left: 0;
    height: 58px;
    flex-basis: 58px;
  }

  .tqpp-sticky__meta {
    order: 2;
    flex: 1 1 calc(100% - 68px);
    min-width: 0;
  }

  .tqpp-sticky__title {
    font-size: 17px;
    line-height: 1.15;
  }

  .tqpp-sticky__subtitle {
    margin-top: 4px;
    font-size: 10px;
  }

  .tqpp-sticky__controls {
    order: 3;
    flex: 1 1 auto;
  }

  .tqpp-sticky__platforms {
    order: 4;
    margin-left: auto;
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  .tqpp-card {
    padding: 16px 12px;
  }

  .tqpp-card__podcast-icon {
    font-size: 25px;
  }

  .tqpp-card__podcast-name {
    max-width: 126px;
    font-size: 11px;
  }

  .tqpp-card__episode {
    font-size: 11px;
  }

  .tqpp-card__title {
    font-size: 21px;
  }

  .tqpp-card__play {
    font-size: 14px;
  }

  .tqpp-sticky__cover {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .tqpp-sticky__meta {
    flex-basis: calc(100% - 62px);
  }

  .tqpp-sticky__title {
    font-size: 15px;
  }

  .tqpp-sticky__subtitle {
    font-size: 9px;
  }


}
