/* PopupReward - estilos del popup real (reutilizado en front y preview) */

.xto__rewarded-modal{
  display:none;
  position:fixed;
  z-index:999;
  top:0; left:0;
  width:100vw; height:100vh;
  backdrop-filter: blur(var(--pr-blur, 5px));
  background-color: rgba(var(--pr-overlay-rgb, 143,156,179), var(--pr-overlay-alpha, 0.20));
  justify-content:center;
  align-items: var(--pr-align, center);
}

.modalDialog{
  background-color: var(--pr-popup-bg, #fff) !important;
  border-radius: var(--pr-popup-radius, 12px) !important;
  padding: 18px !important;
  box-shadow: var(--pr-shadow, rgba(0,0,0,0.12) 0px 8px 24px) !important;
  text-align:center !important;
  max-width: 92% !important;
  width: var(--pr-width, 420px) !important;
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  box-sizing:border-box !important;
  font-weight:400 !important;
  line-height:normal !important;

  animation-name: var(--pr-anim-name, prFadeScale) !important;
  animation-duration: var(--pr-anim-dur, 250ms) !important;
  animation-timing-function: ease !important;
  animation-fill-mode: both !important;
}

.xto-qz {
  text-align:center !important;
  max-width: 92% !important;
  width: var(--pr-width, 420px) !important;
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  box-sizing:border-box !important;
  font-weight:400 !important;
  line-height:normal !important;

  animation-name: var(--pr-anim-name, prFadeScale) !important;
  animation-duration: var(--pr-anim-dur, 250ms) !important;
  animation-timing-function: ease !important;
  animation-fill-mode: both !important;
}

.stpr_inner-front {
  overflow: auto;
  background-color: var(--pr-popup-bg, #fff) !important;
  border-radius: var(--pr-popup-radius, 12px) !important;
  box-shadow: var(--pr-shadow, rgba(0,0,0,0.12) 0px 8px 24px) !important;
}

.stpr_popup-content {
  padding: 18px !important; 
}

/* =========================
   BOTON CERRAR
   ========================= */
        .xto-qz .close-button {
            /* Posicionamiento */
            position: absolute;
            top: -15px; /* Ajustado para sobresalir un poco como en la imagen */
            right: -15px;
            
            /* Dimensiones y Forma */
            width: 30px;
            height: 30px;
            border-radius: 50%;
            
            /* Estilo Visual */
            /*background-color: #ffffff;*/
            background-color: var(--pr-close-color, #ffffff);
            border: 0px solid #e0e0e0;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            
            /* Centrado del icono */
            display: flex;
            align-items: center;
            justify-content: center;
            
            /* Interacción */
            cursor: pointer;
            transition: all 0.2s ease;
            outline: none;
            padding: 0;
        }

        .xto-qz .close-button:hover {
            background-color: #f0f0f0;
            transform: scale(1.05);
        }

        .xto-qz .close-button:active {
            transform: scale(0.95);
        }

        /* Icono X usando SVG */
        .xto-qz .close-icon {
            width: 14px;
            height: 14px;
            stroke: var(--pr-close-icon-color, #333333);
            stroke-width: 2.5;
            stroke-linecap: round;
        }

/* =========================
   MENSAJE TOAST
   ========================= */
.toast{
  position:fixed;
  font-family: Roboto, Helvetica, Arial, sans-serif !important;
  width: 280px;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color:#252525;
  color:#fff;
  padding:7px 15px;
  border-radius:8px;
  box-shadow:0 6px 16px rgba(0,0,0,0.25);
  justify-content:space-between;
  align-items: var(--pr-align, center);
  gap:10px;
  font-size:14px;
  z-index:10000;
  display:flex;
  opacity:0;
  /*transition:opacity .35s ease;*/
  visibility:hidden;
  pointer-events:none;
  transition:opacity .35s ease, visibility .35s ease;
}
.toast.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.toast button{
  background:none;
  border:none;
  color:white;
  font-size:18px;
  cursor:pointer;
  margin-left:10px;
  padding: 0;
}

/* Modal 2 (confirmación) */
#modal2 .modalDialog{
  width: 340px !important;
  padding: 18px !important;
}

@media (max-width: 900px){
  .modalDialog{
    width: calc(100% - 40px) !important;
    margin: 0 20px !important;
  }
}

/* =========================
   ESTILOS CUESTIONARIO
   ========================= */

/*
.xto-qz__header{
  display:flex;
  align-items: var(--pr-align, center);
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
*/

.xto-qz__logo{
  height: auto;
  object-fit:contain;
  width:100%;
  max-width: var(--pr-logo-width, 70%);
}

/* Imagen de cabecera (encima del logo) */
.xto-qz__headerimg{
  width: 100%;
  display:block;
  object-fit: cover;
  margin: 0;
  height: var(--pr-header-height, auto);
}

/* =========================
   BARRA DE PROGRESO
   ========================= */

.xto-qz__progress{ margin: 0 0 12px 0; }

/* --- CONTENEDOR PRINCIPAL (COLOR SÓLIDO) --- */
.xto-qz__progressbar {
    width: 100%;
    height: 10px;
    background-color: var(--pr-progress-bg, rgba(25,118,210,0.12)); /* Gris sólido */
    border-radius: 999px; /* Bordes más rectos para un look sólido */
    overflow: hidden;
    position: relative;
}

/* --- RELLENO CON COLORES SÓLIDOS (FILL) --- */
.xto-qz__progressfill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background-color: var(--pr-progress-fill, rgb(25,118,210)); /* Azul sólido */
    position: relative;
    transition: width 0.8s ease;
    
    /* Franjas usando solo colores sólidos y transparencia */
    background-image: linear-gradient(
        45deg, 
        rgba(255, 255, 255, 0.2) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.2) 75%, 
        transparent 75%, 
        transparent
    );
    
    /* Tamaño de las franjas */
    background-size: 40px 40px;
    
    /* Animación de desplazamiento */
    animation: moveStripes 1s linear infinite;
}

/* Animación simplificada para un solo fondo */
@keyframes moveStripes {
    from { background-position: 0 0; }
    to { background-position: 40px 0; }
}

.xto-qz__progressText{
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--pr-small-size, 13px);
  color: var(--pr-body-color, rgb(107,110,118));
  margin-top: 6px;
  text-align:center;
}
/* Bloqueo de scroll mientras el modal está abierto */
html.pr-scroll-locked{ overflow:hidden !important; }


.xto-qz__body{ width:100%; }
.xto-qz__view{ width:100%; }

.xto-qz__title{
  font-family: Poppins, Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--pr-title-size, 20px);
  font-weight: var(--pr-title-weight, 700);
  color: var(--pr-title-color, rgb(32,33,36));
  margin: 6px 0 10px;
  text-align:center;
}
.xto-qz__sub{
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--pr-body-size, 15px);
  color: var(--pr-body-color, rgb(107,110,118));
  text-align:center;
  margin: 0 0 12px;
}

.xto-qz__options{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 6px;
}
.xto-qz__optBtn{
  width: var(--pr-btn-w, 100%);
  border: 1px solid var(--pr-quiz-btn-border, transparent);
  background: var(--pr-quiz-btn-bg, var(--pr-quiz-bg, rgba(25,118,210,0.06)));
  color: var(--pr-quiz-btn-text, var(--pr-quiz-text, rgb(25,118,210)));
  padding: 12px 12px;
  border-radius: var(--pr-btn-radius, 10px);
  cursor:pointer;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align:center;
  transition: transform .04s ease, opacity .15s ease;
}
.xto-qz__optBtn:hover{ opacity: .92; }
.xto-qz__optBtn:active{ transform: scale(0.99); }

.xto-qz__hint{
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 12.5px;
  color: var(--pr-body-color, rgb(120,124,132));
  text-align:center;
  margin-top: 12px;
  font-style: italic;
}

.xto-qz__loaderWrap{
  display:flex;
  flex-direction:column;
  align-items: var(--pr-align, center);
  justify-content:center;
  min-height: 190px;
  gap: 12px;
}
.xto-qz__spinner{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.12);
  border-top-color: var(--pr-progress-fill, rgb(25,118,210));
  animation: xtoSpin 0.9s linear infinite;
}
@keyframes xtoSpin { to { transform: rotate(360deg); } }

.xto-qz__loadingText{
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: var(--pr-title-color, rgb(32,33,36));
  display:flex;
  gap:6px;
  align-items: var(--pr-align, center);
}
.xto-qz__dots::after{
  content:"";
  display:inline-block;
  width: 18px;
  text-align:left;
  animation: xtoDots 1.2s steps(4,end) infinite;
}
@keyframes xtoDots{
  0%{ content:""; }
  25%{ content:"."; }
  50%{ content:".."; }
  75%{ content:"..."; }
  100%{ content:""; }
}

.xto-qz__cta{
  border: 1px solid var(--pr-primary-border, rgb(var(--pr-btn-rgb, 25,118,210)));
  cursor: pointer;
  border-radius: var(--pr-btn-radius, 10px);
  padding: 12px 14px;
  margin: 6px auto 0;
  background-color: var(--pr-primary-bg, rgb(var(--pr-btn-rgb, 25,118,210)));
  display:flex;
  align-items: var(--pr-align, center);
  justify-content:center;
  gap:10px;
  width: var(--pr-btn-w, 100%);
  color: var(--pr-primary-text, #fff);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  transition: transform .15s ease, opacity .15s ease;
}
.xto-qz__cta:hover{ opacity: .92; }
.xto-qz__cta:active{ transform: scale(0.99); }
.xto-qz__play{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--pr-primary-text, #fff);
  position: relative;
}
.xto-qz__play::before{
  content:"";
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  width: 0;
  height: 0;
  border-left: 7px solid rgb(var(--pr-btn-rgb, 25,118,210));
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}


/* ---- Diseño dinámico (vars) + aviso cerrar ---- */
@keyframes prFadeScale{
  from{ opacity:0; transform: translateY(6px) scale(0.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
@keyframes prSlideUp{
  from{ opacity:0; transform: translateY(16px); }
  to{ opacity:1; transform: translateY(0); }
}

.pr-close-title{
  margin: 6px 0 12px;
  color: var(--pr-title-color, rgb(51, 51, 51));
  font-size: var(--pr-title-size, 20px);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-weight: var(--pr-title-weight, 700);
}
.pr-close-message{
  margin: 0 0 10px;
  font-size: var(--pr-body-size, 15px);
  color: var(--pr-body-color, rgb(51, 51, 51));
  font-family: Roboto, Helvetica, Arial, sans-serif;
}
.pr-btn{
  cursor:pointer;
  padding: 10px 14px;
  border-radius: var(--pr-btn-radius, 10px);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--pr-body-size, 15px);
  font-weight: 700;
  transition: transform .15s ease, opacity .15s ease;
}
.pr-btn:active{ transform: scale(0.99); }
.pr-btn-primary{
  background: var(--pr-primary-bg, rgb(var(--pr-btn-rgb, 25,118,210)));
  border: 1px solid var(--pr-primary-border, rgb(var(--pr-btn-rgb, 25,118,210)));
  color: var(--pr-primary-text, #fff);
}
.pr-btn-secondary{
  background: transparent;
  border: 1px solid rgb(var(--pr-back-rgb, 63,63,63));
  color: rgb(var(--pr-back-rgb, 63,63,63));
}

.pr-btn:hover{ opacity: .92; }

/* ===========================================
   VIDEO GATE — Overlay por video bloqueado
   =========================================== */

/* Neutraliza el padding-top del wrapper de Gutenberg */
.wp-block-embed__wrapper:has(.pr-vg-wrapper) {
  padding-top: 0 !important;
}
.wp-block-embed__wrapper:has(.pr-vg-wrapper)::before {
  display: none !important;
}

/* Neutraliza el padding-bottom de Neve y otros temas que usan el truco CSS 16:9 */
.nv-iframe-embed:has(.pr-vg-wrapper),
[class*="iframe-embed"]:has(.pr-vg-wrapper),
.wp-block-embed__wrapper > div:has(.pr-vg-wrapper) {
  padding-bottom: 0 !important;
  height: auto !important;
}

/* Wrapper que reemplaza al iframe */
.pr-vg-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  animation: prVgFadeIn 0.3s ease;
}

/* Thumbnail de fondo (miniatura de YouTube) */
.pr-vg-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) brightness(0.45);
  transform: scale(1.05);
}

/* Overlay — solo fondo oscuro, sin elementos clickeables */
.pr-vg-overlay {
  position: absolute;
  inset: 0;
}

/* Animación de entrada cuando el overlay aparece */
@keyframes prVgFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.pr-vg-wrapper {
  animation: prVgFadeIn 0.3s ease;
}

/* Estado desbloqueado — fade out del overlay antes de mostrar el iframe */
.pr-vg-wrapper.pr-vg-unlocked .pr-vg-overlay {
  animation: prVgFadeOut 0.3s ease forwards;
  pointer-events: none;
}

@keyframes prVgFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}



/* ===========================================
   VIDEO GATE — Consent Card
   =========================================== */

.pr-vg-consent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2;
}

.pr-vg-consent-card {
  position: relative;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--pr-modal-radius, 16px);
  padding: 22px 24px 20px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: prVgCardIn 0.22s ease;
}

@keyframes prVgCardIn {
  from { opacity: 0; transform: scale(0.93) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pr-vg-consent-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  line-height: 1;
  transition: background 0.15s;
  padding: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.pr-vg-consent-close:hover { background: rgba(255,255,255,0.28); }

.pr-vg-consent-msg {
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  line-height: 1.5;
  margin: 6px 0 16px;
  padding: 0 4px;
}

.pr-vg-consent-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--pr-btn-radius, 10px);
  background: #ff0000;
  color: #fff;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s, background 0.15s;
  box-shadow: 0 2px 12px rgba(255,0,0,0.4);
}
.pr-vg-consent-btn:hover  { background: #cc0000; opacity: 1; }
.pr-vg-consent-btn:active { transform: scale(0.98); }
.pr-vg-consent-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Overlay siempre no interactivo — la consent card maneja las acciones */
.pr-vg-overlay {
  pointer-events: none;
}

@keyframes prVgCardOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.95); }
}
.pr-vg-consent.pr-vg-consent-hiding {
  animation: prVgCardOut 0.18s ease forwards;
  pointer-events: none;
}

@media (max-width: 480px) {
  .pr-vg-consent-card { padding: 18px 16px 16px; max-width: 260px; }
  .pr-vg-consent-msg  { font-size: 13px; }
  .pr-vg-consent-btn  { font-size: 14px; padding: 8px 12px; }
}
