/* Exit-intent app invite. Standalone so pages outside /blog (quizzes, landing
   pages) can use it without pulling in the whole blog stylesheet.
   Paired with /js/exit-intent.js. */

/* ===== Exit-intent app invite =====
   Two presentations from one markup block. Desktop gets a centered modal;
   touch gets a compact bottom banner (Google exempts small dismissible
   banners from the intrusive-interstitial penalty, but not modals). */
.cc-invite[hidden] { display: none; }
.cc-invite { position: fixed; inset: 0; z-index: 9999; }

.cc-invite-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 22, 30, 0.55);
  opacity: 0; transition: opacity 0.2s ease;
}
.cc-invite.is-open .cc-invite-backdrop { opacity: 1; }

.cc-invite-card {
  position: absolute;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(20, 22, 30, 0.22);
  padding: 26px 26px 20px;
  text-align: center;
}
.cc-invite-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: transparent; color: #8A8A8A;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.cc-invite-close:hover { background: #F2F2F2; color: #1A1A1A; }
.cc-invite-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #12A594; margin: 0 0 8px;
}
.cc-invite-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 21px; line-height: 1.25; color: #1A1A1A; margin: 0 0 8px;
}
.cc-invite-card p { font-size: 14px; line-height: 1.5; color: #4A4A4A; margin: 0 0 14px; }

.cc-invite-proof {
  list-style: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #F7F6F4;
  border-radius: 10px;
  text-align: left;
}
.cc-invite-proof li {
  position: relative;
  padding-left: 24px;
  font-size: 13px;
  line-height: 1.45;
  color: #1A1A1A;
}
.cc-invite-proof li + li { margin-top: 6px; }
/* Checkmark drawn in CSS, not an emoji or an image request. */
.cc-invite-proof li::before {
  content: "";
  position: absolute;
  left: 6px; top: 4px;
  width: 5px; height: 10px;
  border: solid #12A594;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cc-invite-actions { display: flex; flex-direction: column; gap: 10px; }
.cc-invite-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; box-sizing: border-box;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.cc-invite-btn.apple { background: #1A1A1A; color: #fff; }
.cc-invite-btn.google { background: #fff; color: #1A1A1A; border: 1px solid #E0E0E0; }
.cc-invite-dismiss {
  display: inline-block; margin-top: 16px;
  background: none; border: 0; cursor: pointer;
  font-size: 13px; color: #8A8A8A; text-decoration: underline;
}

/* Desktop: centered modal */
.cc-invite--modal .cc-invite-card {
  top: 50%; left: 50%;
  width: min(380px, calc(100vw - 40px));
  transform: translate(-50%, -46%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cc-invite--modal.is-open .cc-invite-card { opacity: 1; transform: translate(-50%, -50%); }

/* Touch: a compact bottom banner, never a full-screen interstitial.
   Google penalizes mobile popups that obscure content, so the backdrop is
   suppressed, the supporting copy is trimmed, and the whole card is held to a
   small slice of the viewport. Keep it that way. */
.cc-invite--banner { top: auto; }
.cc-invite--banner .cc-invite-backdrop { display: none; }
.cc-invite--banner .cc-invite-card {
  left: 0; right: 0; bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 12px;
  box-shadow: 0 -6px 28px rgba(20, 22, 30, 0.16);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}
.cc-invite--banner.is-open .cc-invite-card { transform: translateY(0); }
.cc-invite--banner .cc-invite-eyebrow { margin-bottom: 4px; }
.cc-invite--banner .cc-invite-card h2 { font-size: 17px; margin-bottom: 6px; }
.cc-invite--banner .cc-invite-card p {
  font-size: 13px; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Trust list and the long button labels are desktop-only: they are what push
   the banner past a "reasonable amount of screen space". */
.cc-invite--banner .cc-invite-proof { display: none; }
.cc-invite--banner .cc-btn-long { display: none; }
.cc-invite--banner .cc-invite-actions { flex-direction: row; gap: 8px; }
.cc-invite--banner .cc-invite-btn { flex: 1; min-height: 44px; padding: 11px 8px; font-size: 13px; }
.cc-invite--banner .cc-invite-dismiss { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .cc-invite-backdrop,
  .cc-invite-card { transition: none !important; }
  .cc-invite--modal .cc-invite-card { transform: translate(-50%, -50%); }
  .cc-invite--banner .cc-invite-card { transform: translateY(0); }
}
