/* ====================================================
   PAYWALL PREMIUM — Libreos.app
   Paleta: Crema #F5F5DC · Sepia #704214 · Oro #B8860B

   SEO: el texto permanece en el DOM (no display:none ni
   visibility:hidden). El blur y el overlay son puramente
   visuales. Google indexa el contenido normalmente gracias
   al Schema.org isAccessibleForFree:false declarado en el
   <head> de cada ficha.
   ==================================================== */


/* ─── 1. Contenido bloqueado ───────────────────────────
   Blur suave: el texto se intuye pero no se lee.
   Todo el contenido permanece en el DOM para SEO.
   ─────────────────────────────────────────────────────── */
.premium-locked {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}


/* ─── 2. CTA de conversión ────────────────────────────
   Aparece ENCIMA del bloque borroso (hermano anterior).
   margin-bottom crea separación antes del texto.
   ─────────────────────────────────────────────────────── */
.paywall-cta {
  position: relative;
  z-index: 3;
  margin: 0 auto 24px;
  width: min(540px, 94%);
  background: linear-gradient(160deg, #faf4e8 0%, #f0e2c8 60%, #ead5b0 100%);
  border: 1.5px solid #8c5a2a;
  border-radius: 20px;
  padding: 30px 36px 26px;
  box-shadow:
    0 12px 44px rgba(112, 66, 20, 0.20),
    0 3px 10px  rgba(0, 0, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
  text-align: center;
  font-family: "Cormorant Garamond", serif;
}

/* Ornamento tipográfico superior */
.paywall-cta::before {
  content: "✦  ✦  ✦";
  display: block;
  font-size: 13px;
  color: #B8860B;
  letter-spacing: 10px;
  margin-bottom: 14px;
  opacity: 0.80;
}

.paywall-cta-title {
  font-size: 23px;
  font-weight: 600;
  color: #3a1e0c;
  margin: 0 0 12px;
  line-height: 1.3;
}

.paywall-cta-body {
  font-size: 16.5px;
  color: #5a3820;
  line-height: 1.72;
  margin: 0 0 22px;
}

.paywall-cta-body strong {
  color: #704214;
  font-weight: 700;
}


/* ─── 3. Botón principal ──────────────────────────────── */
.btn-premium {
  display: inline-block;
  font-family: "Cormorant Garamond", serif;
  font-size: 17px;
  font-weight: 700;
  color: #fdf4dc;
  background: linear-gradient(135deg, #d4a820 0%, #B8860B 45%, #7a4a18 100%);
  border: none;
  border-radius: 12px;
  padding: 13px 34px;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow:
    0 5px 20px rgba(112, 66, 20, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.btn-premium:hover,
.btn-premium:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(112, 66, 20, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  outline: none;
}

.btn-premium:active {
  transform: translateY(-1px);
}


/* ─── 4. Enlace de login secundario ──────────────────── */
.paywall-login-link {
  display: block;
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 14.5px;
  color: #704214;
  opacity: 0.72;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.15s ease;
}

.paywall-login-link:hover {
  opacity: 1;
}


/* ══════════════════════════════════════════════════════
   SECCIÓN "POR QUÉ EMBARCARTE": blur + pill arriba
   ══════════════════════════════════════════════════════ */

.reading-locked-wrapper {
  position: relative;
}

/* Blur completo en la tarjeta */
.reading-locked-wrapper .book-extra.reading-card {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

/* Overlay: pill anclada en la parte superior */
.reading-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22px;
  z-index: 5;
}


/* ══════════════════════════════════════════════════════
   RUTAS: pasos bloqueados (desde el 2.º en adelante)
   ══════════════════════════════════════════════════════ */

.step-locked {
  position: relative;
}

.step-locked .ruta-paso-card {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.step-locked .ruta-paso-numero {
  opacity: 0.30;
}

.step-locked-gradient {
  position: relative;
  height: 80px;
  margin-top: -80px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent                0%,
    rgba(246, 236, 222, 0.65)  45%,
    rgba(244, 232, 216, 0.95) 80%,
    #f4e8d8                  100%
  );
}

/* Pill compartida: rutas + reading-card */
.step-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.step-locked-pill {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  font-weight: 600;
  color: #704214;
  background: linear-gradient(145deg, #F5F5DC 0%, #ede8d4 100%);
  border: 1.5px solid #B8860B;
  border-radius: 999px;
  padding: 9px 26px;
  box-shadow:
    0 4px 16px rgba(112, 66, 20, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.60);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.step-locked-pill:hover {
  transform: scale(1.04);
  box-shadow:
    0 8px 22px rgba(112, 66, 20, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
}


/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 560px) {
  .paywall-cta {
    padding: 24px 20px 22px;
    margin-bottom: 18px;
  }

  .paywall-cta-title {
    font-size: 20px;
  }

  .paywall-cta-body {
    font-size: 15.5px;
  }

  .btn-premium {
    font-size: 16px;
    padding: 12px 24px;
  }
}


/* ════════════════════════════════════════════════════════════
   MODAL PAYWALL — Rutas y Autores (listas-paywall.js)
   Paleta: Crema · Sepia · Oro — consistente con el resto del paywall
   ════════════════════════════════════════════════════════════ */

#listasPaywallModal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: visible;
}

#listasPaywallModal[aria-hidden="true"] {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.22s;
}

#listasPaywallModal[aria-hidden="true"] .lpm-backdrop,
#listasPaywallModal[aria-hidden="true"] .lpm-dialog {
  opacity: 0;
}

/* Fondo oscuro */
.lpm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 5, 0.62);
  backdrop-filter: blur(3px);
  opacity: 1;
  transition: opacity 0.22s ease;
}

/* Tarjeta del modal */
.lpm-dialog {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  background: linear-gradient(160deg, #faf4e8 0%, #f0e2c8 60%, #ead5b0 100%);
  border: 1.5px solid #8c5a2a;
  border-radius: 22px;
  padding: 38px 40px 34px;
  box-shadow:
    0 20px 60px rgba(112, 66, 20, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#listasPaywallModal[aria-hidden="true"] .lpm-dialog {
  transform: scale(0.95);
}

/* Botón cerrar */
.lpm-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 18px;
  color: #8c5a2a;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.lpm-close:hover { opacity: 1; }

/* Ornamento */
.lpm-ornament {
  font-size: 12px;
  color: #B8860B;
  letter-spacing: 10px;
  margin: 0 0 18px;
  opacity: 0.85;
}

/* Título */
.lpm-title {
  font-size: 24px;
  font-weight: 600;
  color: #3a1e0c;
  margin: 0 0 14px;
  line-height: 1.28;
}

/* Cuerpo */
.lpm-body {
  font-size: 16.5px;
  color: #5a3820;
  line-height: 1.72;
  margin: 0 0 26px;
}

.lpm-body strong {
  color: #704214;
  font-weight: 700;
}

/* CTA y login heredan .btn-premium y .paywall-login-link */
.lpm-cta {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

.lpm-login {
  display: block;
  margin: 0 auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .lpm-dialog {
    padding: 30px 24px 26px;
    border-radius: 18px;
  }
  .lpm-title { font-size: 20px; }
  .lpm-body  { font-size: 15px; }
}


/* =============================================================
   Google Play Billing — Botones de suscripción
   Inyectados por premium-android.js en [data-billing-container]
   ============================================================= */

.gp-billing-wrapper {
  padding: 8px 4px 4px;
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
}

.gp-billing-title {
  font-size: 20px;
  font-weight: 700;
  color: #3e271a;
  margin: 0 0 4px;
  letter-spacing: 0.2px;
}

.gp-billing-subtitle {
  font-size: 13px;
  color: #7b6a5b;
  margin: 0 0 16px;
  font-style: italic;
}

.gp-plan-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(184, 146, 103, 0.4);
  background: linear-gradient(145deg, #fdf6ee, #f5e9d8);
  cursor: pointer;
  position: relative;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gp-plan-btn:hover:not(:disabled) {
  border-color: #b8925b;
  box-shadow: 0 4px 14px rgba(184, 146, 103, 0.25);
  transform: translateY(-1px);
}

.gp-plan-btn--loading,
.gp-plan-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.gp-plan-btn--loading .gp-plan-price::after {
  content: '…';
  animation: gpPricePulse 1.2s ease-in-out infinite;
}

@keyframes gpPricePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.gp-plan-btn--featured {
  background: linear-gradient(145deg, #3e271a, #5a3f2a);
  border-color: #b8925b;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.gp-plan-btn--featured:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.gp-plan-badge {
  font-size: 11px;
  font-weight: 700;
  color: #b8925b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.gp-plan-btn--featured .gp-plan-badge {
  color: #e8c97a;
}

.gp-plan-label {
  font-size: 17px;
  font-weight: 700;
  color: #3e271a;
  letter-spacing: 0.2px;
}

.gp-plan-btn--featured .gp-plan-label {
  color: #fff8ea;
}

.gp-plan-price {
  font-size: 22px;
  font-weight: 700;
  color: #b8925b;
  margin-top: 2px;
}

.gp-plan-btn--featured .gp-plan-price {
  color: #e8c97a;
}

.gp-plan-saving {
  font-size: 12px;
  color: #9d7848;
  margin-top: 2px;
  font-style: italic;
}

.gp-plan-btn--featured .gp-plan-saving {
  color: #c8a77b;
}

.gp-restore-btn {
  background: none;
  border: none;
  color: #9d7848;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  margin: 6px 0 12px;
  padding: 0;
}

.gp-restore-btn:hover {
  color: #b8925b;
}

.gp-legal {
  font-size: 11px;
  color: #9d8b7a;
  line-height: 1.5;
  margin-top: 8px;
  text-align: center;
}

.gp-legal a {
  color: #b8925b;
  text-decoration: underline;
}
