/* ============================================================
   Paywall — full-screen premium upgrade modal
   Triggered when user taps premium feature
   Anti-dark-pattern compliant: trial + post-trial price shown upfront
   ============================================================ */

.paywall {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: linear-gradient(170deg, #ffffff 0%, #f0f4fa 100%);
  display: none;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.paywall.open { display: flex; animation: paywallSlide 0.35s ease-out; }
/* The paywall is a flex column; without this, when content is taller than the
   viewport flexbox SHRINKS the children — the navy hero collapsed to ~92px and
   overflow:hidden clipped the lamb to a head-sliver. Natural heights + scroll
   instead. (2026-06-22) */
.paywall > * { flex-shrink: 0; }
@keyframes paywallSlide {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pw-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  /* Sits on the navy hero → white so it's clearly visible */
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.pw-close:hover { background: rgba(255, 255, 255, 0.34); }

/* Hero */
.pw-hero {
  background: linear-gradient(135deg, #123c68 0%, #1f4c84 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 60px) 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pw-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(245,215,122,0.18) 0%, transparent 60%);
}
.pw-hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(245,215,122,0.12) 0%, transparent 60%);
}
.pw-hero-icon { font-size: 3.5rem; margin-bottom: 12px; }
.pw-hero h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 700; position: relative; }
.pw-hero p  { margin: 0; opacity: 0.85; font-size: 0.98rem; position: relative; line-height: 1.5; }

/* Benefits list (dark on white) */
.pw-benefits {
  padding: 24px 24px 0;
  list-style: none;
  margin: 0;
}
.pw-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2d3d;
}
.pw-benefits li:last-child { border: none; }
.pw-benefits .b-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5d77a, #d4a017);
  color: #1a1a2e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.pw-benefits .b-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.pw-benefits .b-text span {
  font-size: 0.83rem;
  color: #3a4a5c;
  line-height: 1.4;
}
.pw-benefits .b-text .b-meta {
  display: block;
  font-size: 0.78rem;
  color: #5b6b7c;
  margin-top: 2px;
}
.pw-benefits .b-text .b-meta strong {
  display: inline;
  color: #b8841e;
  font-weight: 800;
  margin-bottom: 0;
}
.pw-compare-heading {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8841e;
  margin: 6px 0 10px;
  text-align: center;
}
.pw-benefits--compare li {
  align-items: flex-start;
}

/* Pricing tabs (anual / mensual) */
.pw-pricing {
  padding: 24px;
}

/* Tier toggle (Individual / Familiar) — iOS-style segmented control */
.pw-tier-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #eef2f7;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.pw-tier-btn {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 10px 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: #3a4a5c;
  cursor: pointer;
  transition: all 0.18s ease;
}
.pw-tier-btn.selected {
  background: #fff;
  color: #123c68;
  box-shadow: 0 2px 6px rgba(18, 60, 104, 0.12);
}
/* "Mejor valor" badge on the Familiar tier — nudges toward the family plan. */
.pw-tier-btn[data-tier="family"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pw-tier-badge {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase;
  color: #1a1206; background: linear-gradient(135deg, #f2c14e, #d9a028);
  padding: 2px 6px; border-radius: 999px; line-height: 1.2;
}
.pw-pricing-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a4a5c;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pw-plan-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.pw-plan {
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.pw-plan:hover { border-color: #cbd5e1; }
.pw-plan.selected {
  border-color: #d4a017;
  background: linear-gradient(180deg, rgba(245,215,122,0.08) 0%, #fff 100%);
  box-shadow: 0 4px 14px rgba(212,160,23,0.18);
}
.pw-plan .label { font-size: 0.78rem; color: #3a4a5c; text-transform: uppercase; letter-spacing: 0.5px; }
.pw-plan .price { font-size: 1.5rem; font-weight: 700; color: #123c68; margin: 4px 0; }
.pw-plan .period { font-size: 0.78rem; color: #3a4a5c; }
.pw-plan .badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: #0d9a4f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

/* Trial pre-disclosure */
.pw-trial-disclose {
  background: #f0f4fa;
  border-left: 3px solid #d4a017;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #1f2d3d;
  line-height: 1.5;
  margin: 0 0 16px;
}
.pw-trial-disclose strong { color: #123c68; }

/* CTA */
.pw-cta {
  width: 100%;
  background: linear-gradient(135deg, #d4a017, #f0c050);
  color: #1a1a2e;
  border: none;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
  margin-bottom: 8px;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(212,160,23,0.3);
}
.pw-cta:active { transform: scale(0.98); }
.pw-cta-sub {
  font-size: 0.78rem;
  color: #3a4a5c;
  text-align: center;
  margin: 8px 0 14px;
  line-height: 1.5;
}

.pw-skip {
  background: transparent;
  color: #3a4a5c;
  font-size: 0.88rem;
  border: none;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.pw-skip:hover { color: #1f2d3d; }

/* Trust indicators */
.pw-trust {
  padding: 14px 24px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: #3a4a5c;
}
.pw-trust .stars { color: #d4a017; font-size: 0.95rem; letter-spacing: 1px; }

/* Footer fine print */
.pw-fineprint {
  padding: 16px 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
  font-size: 0.72rem;
  color: #3a4a5c;
  text-align: center;
  line-height: 1.5;
  border-top: 1px solid #e2e8f0;
}
.pw-fineprint a { color: #1f4c84; text-decoration: none; }
.pw-fineprint a:hover { text-decoration: underline; }

.pw-login-link { display: block; width: 100%; margin: 4px auto 0; padding: 10px; background: none;
  border: none; color: #1f4c84; font-family: inherit; font-size: 0.88rem;
  font-weight: 800; cursor: pointer; text-align: center; text-decoration: underline;
  text-underline-offset: 3px; }
.pw-login-link:active { opacity: 0.6; }
