/**
 * browse-paywall-1558259.css
 *
 * Owns: Settlement listing paywall — frosted blur overlay for non-Pro users after card 6.
 * Does NOT own: Individual settlement detail pages, Pro/family/autopilot user sessions.
 *
 * Applied when:
 *   - SSR grid: #sr-ssr-grid.pw-active — CSS nth-child selector blurs cards 7+
 *   - JS grid:  .dir-card-wrap.pw-blurred — added by JS for each card beyond index 6
 *   - Overlay:  #pw-overlay — placed in DOM only for non-Pro users (EJS gates it)
 *
 * Removed entirely when user is Pro/Pro+/Family/Autopilot (EJS skips overlay + classes).
 */

/* ── Wrapper that positions the overlay relative to the grid ── */
#pw-gate-wrap {
  position: relative;
}

/* ── Blur: SSR grid — cards 7 and beyond ─────────────────────── */
#sr-ssr-grid.pw-active .dir-card-wrap:nth-child(n+7) {
  filter: blur(6px) saturate(0.5);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.3s ease;
}

/* ── Blur: JS grid — cards tagged with pw-blurred ────────────── */
.dir-card-wrap.pw-blurred {
  filter: blur(6px) saturate(0.5);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.3s ease;
}

/* Prevent text selection on blurred content */
#sr-ssr-grid.pw-active .dir-card-wrap:nth-child(n+7) *,
.dir-card-wrap.pw-blurred * {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Overlay card ────────────────────────────────────────────── */
#pw-overlay {
  /* Overlap the blurred cards — negative margin pulls it up into the blurred zone */
  position: relative;
  z-index: 10;
  margin: -120px auto 0;
  width: min(600px, 92vw);
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.05),
    0 20px 60px rgba(0,0,0,0.12),
    0 0 0 1.5px rgba(0,0,0,0.06);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}

/* Gradient mask: fades the blurred grid into the overlay cleanly */
#pw-overlay::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -30px;
  right: -30px;
  height: 100px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.85) 55%,
    rgba(255,255,255,0.98) 100%
  );
  pointer-events: none;
}

/* Lock icon */
.pw-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 14px;
  margin-bottom: 1rem;
}

.pw-lock-icon svg {
  width: 26px;
  height: 26px;
  color: #065f46;
}

/* Headline */
.pw-headline {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  font-weight: 800;
  color: #0a0a0a;
  line-height: 1.2;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

/* Counter text */
.pw-counter {
  font-size: 0.88rem;
  color: #6b7280;
  margin: 0 0 1.1rem;
  line-height: 1.5;
}

.pw-counter strong {
  color: #065f46;
  font-weight: 700;
}

/* Value props list */
.pw-props {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
  background: #f9fafb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.25rem;
}

.pw-prop {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: #374151;
  font-weight: 500;
}

.pw-prop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #d1fae5;
  border-radius: 6px;
  flex-shrink: 0;
}

.pw-prop-icon svg {
  width: 13px;
  height: 13px;
  color: #065f46;
  stroke-width: 2.5;
}

/* CTA button */
.pw-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: #0D6B3D;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(13,107,61,0.3);
  letter-spacing: -0.01em;
}

.pw-cta:hover,
.pw-cta:focus {
  background: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,107,61,0.35);
  color: #ffffff;
  text-decoration: none;
}

.pw-cta:active {
  transform: translateY(0);
}

.pw-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Price badge inside CTA */
.pw-price-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Sign-in nudge */
.pw-signin {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.7rem;
  margin-bottom: 0;
}

.pw-signin a {
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pw-signin a:hover {
  color: #0D6B3D;
}

/* Spacer below overlay so page doesn't abruptly end */
#pw-overlay + .pw-gate-spacer {
  height: 2rem;
}

/* ── Mobile adjustments ──────────────────────────────────────── */
@media (max-width: 600px) {
  #pw-overlay {
    margin-top: -80px;
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .pw-headline {
    font-size: 1.15rem;
  }

  .pw-props {
    gap: 0.4rem;
    padding: 0.85rem 0.9rem;
  }

  .pw-prop {
    font-size: 0.84rem;
  }

  .pw-cta {
    font-size: 0.92rem;
    padding: 0.8rem 1.25rem;
  }
}

@media (max-width: 380px) {
  .pw-lock-icon {
    width: 44px;
    height: 44px;
  }
  .pw-headline {
    font-size: 1.05rem;
  }
}
