/*
╔══════════════════════════════════════════════════════════════╗
║  COMPARE PARKING PRICES — Reward Popup Styles               ║
║  cpp-popup.css  |  Version 4.0                              ║
╠══════════════════════════════════════════════════════════════╣
║                                                              ║
║  BRAND COLOURS — edit :root variables only:                  ║
║    --cpp-navy       Hero background navy                     ║
║    --cpp-teal       CTA button teal                          ║
║    --cpp-red        Brand red (available for accents)        ║
║                                                              ║
║  BREAKPOINTS                                                 ║
║    Mobile  < 520px  → FAB shown, sticky hidden              ║
║    Desktop ≥ 520px  → Sticky shown, FAB hidden              ║
╚══════════════════════════════════════════════════════════════╝
*/

/* ── GOOGLE FONTS loaded via <link> in HTML ────────────────── */

/* ══════════════════════════════════════════════
   CSS VARIABLES
══════════════════════════════════════════════ */
:root {
  /* ★ Brand colours — edit here */
  --cpp-navy:         #1a2b5e;
  --cpp-navy-mid:     #1e3580;
  --cpp-navy-light:   #243a8a;
  --cpp-red:          #c0021a;
  --cpp-teal:         #009999;
  --cpp-teal-mid:     #00b8a9;
  --cpp-green:        #10b981;
  --cpp-green-glow:   rgba(16,185,129,0.42);

  /* Neutrals */
  --cpp-white:   #ffffff;
  --cpp-surface: #f8faff;
  --cpp-border:  #e8eef8;
  --cpp-text:    #1f2937;
  --cpp-muted:   #6b7280;
  --cpp-subtle:  #9ca3af;

  /* Typography */
  --cpp-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --cpp-font-body:    'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Geometry */
  --cpp-r-sheet: 28px;
  --cpp-r-card:  20px;
  --cpp-r-btn:   16px;

  /* Shadows */
  --cpp-sh-sheet:  0 -8px 48px rgba(0,0,0,0.24), 0 -1px 0 rgba(0,0,0,0.06);
  --cpp-sh-cta:    0 6px 24px rgba(0,153,153,0.44), 0 2px 8px rgba(0,153,153,0.2);
  --cpp-sh-fab:    0 8px 28px rgba(26,43,94,0.5), 0 2px 8px rgba(26,43,94,0.3);
  --cpp-sh-sticky: 0 -4px 24px rgba(0,0,0,0.14), 0 -1px 0 rgba(0,0,0,0.06);

  /* Z-index stack */
  --cpp-z-overlay: 9998;
  --cpp-z-fab:     9997;
  --cpp-z-sticky:  9997;
}

*, *::before, *::after { box-sizing: border-box; }

/* ══════════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════════ */
.cpp-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: var(--cpp-z-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cpp-overlay.is-open { opacity: 1; visibility: visible; }

/* ══════════════════════════════════════════════
   BOTTOM SHEET
══════════════════════════════════════════════ */
.cpp-sheet {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 96vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cpp-white);
  border-radius: var(--cpp-r-sheet) var(--cpp-r-sheet) 0 0;
  box-shadow: var(--cpp-sh-sheet);
  font-family: var(--cpp-font-body);
  transform: translateY(110%);
  transition: transform 0.44s cubic-bezier(0.16,1,0.3,1);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.cpp-overlay.is-open .cpp-sheet { transform: translateY(0); }

.cpp-handle {
  width: 38px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 12px auto 0;
  position: relative; z-index: 2;
}

/* ── CLOSE BUTTON ─────────────────────────────── */
/* .cpp-close {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  width: 30px; height: 30px; border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.86);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
} */
.cpp-close {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 99999;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}


.cpp-close:hover  { background: rgba(255,255,255,0.28); }
.cpp-close:active { transform: scale(0.9); }

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.cpp-hero {
  position: relative; overflow: hidden;
  border-radius: var(--cpp-r-sheet) var(--cpp-r-sheet) 0 0;
  padding: 30px 22px 24px;
  background: linear-gradient(
    150deg,
    var(--cpp-navy)      0%,
    var(--cpp-navy-mid) 50%,
    #2040a0             100%
  );
}
.cpp-hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* Orbs */
.cpp-orb { position: absolute; border-radius: 50%; }
.co1 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.09) 0%, transparent 68%);
  top: -85px; right: -55px;
}
.co2 {
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(99,130,255,0.18) 0%, transparent 70%);
  bottom: -50px; left: -28px;
  animation: cppOrbFloat 7s ease-in-out infinite;
}
.co3 {
  width: 70px; height: 70px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  top: 40%; left: 44%;
}
@keyframes cppOrbFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

/* Confetti */
.cpp-cc {
  position: absolute; border-radius: 2px;
  top: -10px; animation: cppFall linear infinite; opacity: 0;
}
.cc1 { width:7px;height:7px;background:#fcd34d;left:10%;animation-duration:3s;animation-delay:.2s }
.cc2 { width:5px;height:10px;background:#6ee7b7;left:22%;animation-duration:3.8s;animation-delay:.7s;border-radius:1px }
.cc3 { width:8px;height:5px;background:#93c5fd;left:40%;animation-duration:2.9s;animation-delay:1.1s }
.cc4 { width:6px;height:6px;background:#fca5a5;left:58%;animation-duration:3.5s;animation-delay:.4s;border-radius:50% }
.cc5 { width:5px;height:9px;background:#c4b5fd;left:72%;animation-duration:3.2s;animation-delay:.9s }
.cc6 { width:7px;height:4px;background:#fde68a;left:85%;animation-duration:2.7s;animation-delay:1.5s }
.cc7 { width:6px;height:6px;background:#a5f3fc;left:30%;animation-duration:4s;animation-delay:0s;border-radius:50% }
.cc8 { width:4px;height:8px;background:#fbcfe8;left:65%;animation-duration:3.3s;animation-delay:1.8s;border-radius:1px }
@keyframes cppFall {
  0%   { transform: translateY(0) rotate(0deg);   opacity: .75; }
  100% { transform: translateY(220px) rotate(360deg); opacity: 0; }
}

/* Airport scene */
.cpp-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cpp-plane {
  position: absolute; top: 12px; right: 52px;
  font-size: 18px; opacity: 0.18; transform: rotate(-8deg);
  animation: cppPlaneFly 16s linear infinite;
}
@keyframes cppPlaneFly {
  0%   { right: -10%; opacity: 0; }
  8%   { opacity: 0.18; }
  92%  { opacity: 0.18; }
  100% { right: 108%; opacity: 0; }
}
.cpp-cloud {
  position: absolute; opacity: 0.1;
  animation: cppCloudDrift linear infinite;
}
.cl1 { font-size: 17px; top: 20px; left: -28px; animation-duration: 24s; }
.cl2 { font-size: 12px; top: 36px; left: -48px; animation-duration: 30s; animation-delay: 8s; }
@keyframes cppCloudDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(520px); }
}
.cpp-road {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 15px; background: rgba(0,0,0,0.14);
}
.cpp-car {
  position: absolute; bottom: 2px; left: -30px;
  font-size: 12px; opacity: 0.24;
  animation: cppCarDrive 10s linear infinite;
}
@keyframes cppCarDrive {
  from { left: -30px; }
  to   { left: 110%; }
}

/* Hero inner */
.cpp-hero-inner { position: relative; z-index: 2; }

.cpp-success-row {
  display: flex; align-items: flex-start; gap: 13px;
  margin-bottom: 16px;
}
.cpp-check-circle {
  width: 42px; height: 42px;
  background: var(--cpp-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--cpp-green-glow);
  animation: cppCheckPop 0.5s cubic-bezier(0.175,0.885,0.32,1.275) 0.25s both;
}
@keyframes cppCheckPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cpp-headline {
  font-family: var(--cpp-font-display);
  font-size: 22px; font-weight: 800;
  color: #fff; line-height: 1.26; letter-spacing: -0.3px;
  margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.cpp-hero-sub {
  font-size: 12px; color: rgba(255,255,255,0.6);
  font-weight: 600; margin: 4px 0 0;
}

/* Gift card */
.cpp-gift-card {
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--cpp-r-card);
  padding: 17px 19px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cpp-gift-shine {
  position: absolute; top: 0; left: -70%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  animation: cppGiftShine 5.5s ease-in-out 1.5s infinite;
}
@keyframes cppGiftShine {
  0%,78%,100% { left: -70%; opacity: 0; }
  84%          { opacity: 1; left: 120%; }
}
.cpp-already-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(167,243,208,0.16);
  border: 1px solid rgba(167,243,208,0.26);
  border-radius: 100px;
  padding: 4px 10px; margin-bottom: 11px;
  font-size: 10px; font-weight: 800;
  color: #a7f3d0; text-transform: uppercase; letter-spacing: 0.5px;
}
.cpp-gift-row {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.cpp-gift-left { display: flex; flex-direction: column; gap: 2px; }
.cpp-glabel {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.58); text-transform: uppercase; letter-spacing: 0.8px;
}
.cpp-gamount {
  font-family: var(--cpp-font-display);
  font-size: 52px; color: #fff;
  line-height: 0.92; letter-spacing: -2px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.24);
}
.cpp-gname {
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.7); margin-top: 4px;
}
.cpp-gift-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
}
.cpp-gift-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px;
}
.cpp-gvalid {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.42); text-transform: uppercase; letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════
   BODY
══════════════════════════════════════════════ */
.cpp-body { background: var(--cpp-white); padding: 20px 20px 0; }

.cpp-body-text {
  font-size: 13.5px; color: var(--cpp-muted);
  line-height: 1.65; margin: 0 0 16px;
}

/* Trust badges */
.cpp-trust-badges { display: flex; gap: 8px; margin-bottom: 17px; }
.cpp-badge {
  flex: 1;
  background: var(--cpp-surface);
  border: 1px solid var(--cpp-border);
  border-radius: 13px;
  padding: 11px 7px; text-align: center;
}
.cpp-badge-icon { font-size: 18px; display: block; margin-bottom: 4px; }
.cpp-badge-label {
  font-size: 10.5px; font-weight: 700;
  color: var(--cpp-text); line-height: 1.35;
}

/* CTA */
.cpp-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 9px; width: 100%; min-height: 58px;
  background: linear-gradient(135deg, var(--cpp-teal) 0%, var(--cpp-teal-mid) 100%);
  color: #fff;
  font-family: var(--cpp-font-body);
  font-size: 16px; font-weight: 800; letter-spacing: -0.2px;
  border: none; border-radius: var(--cpp-r-btn);
  cursor: pointer;
  box-shadow: var(--cpp-sh-cta);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.cpp-cta:hover  { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,153,153,0.5); }
.cpp-cta:active { transform: translateY(0); }

.cpp-micro {
  text-align: center;
  font-size: 11.5px; color: var(--cpp-subtle);
  font-weight: 600; margin: 8px 0 15px;
}

/* Fallback store links */
.cpp-fallback { display: flex; gap: 10px; margin-bottom: 15px; }
.cpp-store-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 7px; padding: 11px;
  background: var(--cpp-surface);
  border: 1px solid var(--cpp-border);
  border-radius: 12px;
  font-family: var(--cpp-font-body);
  font-size: 12px; font-weight: 700;
  color: var(--cpp-text); text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.cpp-store-btn:hover { background: #eff6ff; border-color: var(--cpp-navy); }

/* Footer */
.cpp-footer {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 15px 0 26px;
  border-top: 1px solid var(--cpp-border); margin-top: 4px;
}
.cpp-partner-logo { height: 22px; width: auto; object-fit: contain; }
.cpp-logo-fallback {
  display: flex; align-items: center;
  font-family: var(--cpp-font-body);
  font-size: 13px; font-weight: 800; color: var(--cpp-muted);
  padding: 4px 12px;
  background: var(--cpp-surface);
  border: 1px solid var(--cpp-border);
  border-radius: 8px;
}
.cpp-trust-line {
  font-size: 11px; color: var(--cpp-subtle);
  font-weight: 600; text-align: center; line-height: 1.5; margin: 0;
}
.cpp-trust-line strong { color: var(--cpp-muted); }


/* ══════════════════════════════════════════════
   FAB — FLOATING ACTION BUTTON (navy brand)
   Mobile only: visible when width < 520px
══════════════════════════════════════════════ */
.cpp-fab-wrap {
  position: fixed;
  bottom: 24px; right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: var(--cpp-z-fab);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  opacity: 0; visibility: hidden;
  transform: scale(0.6) translateY(20px);
  transition: opacity 0.35s ease, visibility 0.35s ease,
              transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
  pointer-events: none;
}
.cpp-fab-wrap.is-visible {
  opacity: 1; visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Tooltip */
.cpp-fab-tooltip {
  position: relative;
  background: var(--cpp-navy);
  color: #fff;
  font-family: var(--cpp-font-body);
  font-size: 12px; font-weight: 700;
  padding: 8px 13px;
  border-radius: 11px; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(26,43,94,0.35);
  animation: cppTooltipBob 3s ease-in-out infinite;
}
.cpp-fab-arrow {
  position: absolute; top: 100%; right: 18px;
  border: 5px solid transparent;
  border-top-color: var(--cpp-navy);
}
@keyframes cppTooltipBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-4px); }
}

/* FAB button — navy for CPP brand */
.cpp-fab-btn {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cpp-navy), var(--cpp-navy-mid));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: var(--cpp-sh-fab);
  animation: cppFabGlow 2.5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.cpp-fab-btn:hover  { transform: scale(1.08); }
.cpp-fab-btn:active { transform: scale(0.95); }

@keyframes cppFabGlow {
  0%,100% { box-shadow: var(--cpp-sh-fab), 0 0 0 0 rgba(26,43,94,0.45); }
  50%     { box-shadow: var(--cpp-sh-fab), 0 0 0 12px rgba(26,43,94,0); }
}

/* Badge */
.cpp-fab-badge {
  position: absolute; top: -2px; right: -2px;
  width: 20px; height: 20px;
  background: #ef4444;
  border-radius: 50%;
  border: 2.5px solid #f8faff;
  font-family: var(--cpp-font-body);
  font-size: 10px; font-weight: 900; color: #fff;
  display: flex; align-items: center; justify-content: center;
  animation: cppBadgePop 0.4s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
@keyframes cppBadgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* Dismiss × */
.cpp-fab-dismiss {
  position: absolute; top: -3px; left: -3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #f8faff;
  background: #6b7280; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.18s;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto; z-index: 1;
}
.cpp-fab-btn:hover .cpp-fab-dismiss    { opacity: 1; }
.cpp-fab-btn:focus-within .cpp-fab-dismiss { opacity: 1; }
.cpp-fab-dismiss:hover { background: #ef4444; }


/* ══════════════════════════════════════════════
   SLIM STICKY BAR (navy brand)
   Desktop only: visible when width ≥ 520px
══════════════════════════════════════════════ */
.cpp-sticky {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: var(--cpp-z-sticky);
  background: linear-gradient(135deg, var(--cpp-navy) 0%, var(--cpp-navy-mid) 100%);
  padding: 13px 20px;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  opacity: 0; visibility: hidden;
  box-shadow: 0 -4px 20px rgba(26,43,94,0.25);
}
.cpp-sticky.is-visible {
  transform: translateY(0); opacity: 1; visibility: visible;
}
.cpp-sticky-inner {
  display: flex; align-items: center; gap: 12px;
  max-width: 900px; margin: 0 auto;
}
.cpp-sticky-emoji { font-size: 22px; flex-shrink: 0; }
.cpp-sticky-copy  { flex: 1; min-width: 0; }
.cpp-sticky-title {
  font-family: var(--cpp-font-body);
  font-size: 14px; font-weight: 800; color: #fff;
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cpp-sticky-sub {
  font-size: 11.5px; color: rgba(255,255,255,0.72); font-weight: 600;
}
.cpp-sticky-btn {
  flex-shrink: 0; padding: 10px 20px; min-height: 42px;
  background: #fff; color: var(--cpp-navy);
  font-family: var(--cpp-font-body);
  font-size: 13.5px; font-weight: 800;
  border: none; border-radius: 11px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.cpp-sticky-btn:hover  { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.cpp-sticky-btn:active { transform: translateY(0); }

.cpp-sticky-x {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.cpp-sticky-x:hover { background: rgba(255,255,255,0.25); color: #fff; }


/* ══════════════════════════════════════════════
   BREAKPOINT — HYBRID SWITCH
   One media query does all the work
══════════════════════════════════════════════ */
@media (max-width: 519px) {
  .cpp-sticky { display: none !important; }
}
@media (min-width: 520px) {
  .cpp-fab-wrap { display: none !important; }
  .cpp-overlay { align-items: center; padding: 24px; }
  .cpp-sheet   { border-radius: 24px; max-height: 90vh; }
  .cpp-handle  { display: none; }
}


/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .cpp-cc, .co2, .cpp-gift-shine, .cpp-check-circle,
  .cpp-plane, .cpp-cloud, .cpp-car,
  .cpp-fab-btn, .cpp-fab-tooltip { animation: none !important; }
  .cpp-sheet   { transition: none; }
  .cpp-overlay { transition: none; }
  .cpp-sticky  { transition: none; }
  .cpp-fab-wrap { transition: none; }
}
