/* ═══════════════════════════════════════════════════════
   CONVERSION ELEMENTS — v4.0
   Aligned with CCT design tokens (--teal-*, --gold, etc.)
   WhatsApp float · Urgency · Social proof toasts
   Exit popup · Quick quote · Comparator
═══════════════════════════════════════════════════════ */

/* ── WHATSAPP FLOATING BUTTON ─────────────────────── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.wa-float__bubble {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-2);
  box-shadow: var(--sh-lg);
  max-width: 220px;
  line-height: 1.55;
  animation: bubblePop .4s cubic-bezier(.175,.885,.32,1.275) both;
  position: relative;
}
.wa-float__bubble strong {
  color: var(--teal-900);
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
}
.wa-float__bubble-close {
  position: absolute;
  top: -8px; right: -8px;
  width: 20px; height: 20px;
  background: var(--stone);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; color: var(--white);
  border: none; line-height: 1;
}
.wa-float__btn {
  width: 60px; height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,.45);
  cursor: pointer;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
  text-decoration: none;
  position: relative;
}
.wa-float__btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(37,211,102,.55);
}
.wa-float__btn i { font-size: 30px; color: var(--white); }
.wa-float__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37,211,102,.28);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: .8; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes bubblePop {
  from { transform: scale(.8) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0);    opacity: 1; }
}

/* ── URGENCY BADGE ────────────────────────────────── */
.urgency-bar {
  background: linear-gradient(90deg, var(--teal-900), var(--teal-700));
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 0;
  text-align: center;
}
.urgency-bar i     { color: var(--gold-lt); margin-right: 5px; }
.urgency-bar strong { font-weight: 700; }

.spots-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3cd;
  border: 1px solid #f0ad4e;
  color: #7a4d00;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  margin-bottom: 10px;
}
.spots-badge i { color: #e85d04; font-size: 13px; }
.spots-badge--critical { background: #fde8e8; border-color: #e74c3c; color: #7a0000; }

.viewers-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--stone);
  margin-bottom: 8px;
}
.viewers-badge .dot {
  width: 8px; height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* ── SOCIAL PROOF TOAST ───────────────────────────── */
.sp-toast {
  position: fixed;
  bottom: 100px;
  left: 24px;
  z-index: 9998;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--sh-xl);
  max-width: 280px;
  font-family: var(--font-body);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-120%);
  transition: transform .4s cubic-bezier(.175,.885,.32,1.275);
}
.sp-toast.is-visible { transform: translateX(0); }
.sp-toast__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sp-toast__name  { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.sp-toast__text  { color: var(--stone); line-height: 1.45; }
.sp-toast__time  { font-size: 11px; color: var(--stone); margin-top: 3px; }

/* ── EXIT INTENT POPUP ────────────────────────────── */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.68);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--mid) var(--ease), visibility var(--mid) var(--ease);
}
.exit-overlay.is-open { opacity: 1; visibility: visible; }

.exit-popup {
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--sh-xl);
  transform: scale(.92) translateY(18px);
  transition: transform .35s cubic-bezier(.175,.885,.32,1.275);
}
.exit-overlay.is-open .exit-popup { transform: scale(1) translateY(0); }

.exit-popup__header {
  background: var(--teal-900);
  padding: 28px 28px 22px;
  text-align: center;
  position: relative;
}
.exit-popup__close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,.14);
  border: none; border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer; color: var(--white); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--fast) var(--ease);
}
.exit-popup__close:hover { background: rgba(255,255,255,.24); }
.exit-popup__emoji  { font-size: 48px; margin-bottom: 12px; display: block; }
.exit-popup__title  { color: var(--white); font-family: var(--font-display); font-size: 26px; margin-bottom: 6px; }
.exit-popup__sub    { color: rgba(255,255,255,.72); font-family: var(--font-body); font-size: 15px; }
.exit-popup__body   { padding: 24px 28px 28px; }

.exit-popup__offer {
  background: var(--teal-50);
  border: 2px dashed var(--teal-400);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 20px;
}
.exit-popup__offer-text {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.exit-popup__offer-code {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--teal-600);
  letter-spacing: 3px;
}
.exit-popup__actions { display: flex; flex-direction: column; gap: 10px; }
.exit-popup__skip {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone);
  cursor: pointer;
  margin-top: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── QUICK QUOTE FORM ─────────────────────────────── */
.quick-quote {
  background: var(--bg-soft);
  border: 2px solid var(--teal-100);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  margin: 36px 0;
}
.quick-quote__title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 6px;
}
.quick-quote__sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--stone);
  margin-bottom: 20px;
}
.quick-quote__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.quick-quote__field { display: flex; flex-direction: column; gap: 5px; }
.quick-quote__field label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.quick-quote__field input,
.quick-quote__field select {
  font-family: var(--font-body);
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  background: var(--white);
  width: 100%;
  transition: border-color var(--fast) var(--ease);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.quick-quote__field input:focus,
.quick-quote__field select:focus {
  outline: none;
  border-color: var(--teal-500);
}
.quick-quote__note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.quick-quote__note i { color: var(--success); font-size: 14px; }

/* ── TOUR COMPARATOR ──────────────────────────────── */
.comparator {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 28px 0;
}
.comparator__header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  background: var(--teal-900);
  color: var(--white);
}
.comparator__header-cell {
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.1);
}
.comparator__header-cell:first-child { text-align: left; }
.comparator__header-cell:last-child  { border-right: none; }
.comparator__row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.comparator__row:last-child { border-bottom: none; }
.comparator__row:nth-child(even) { background: var(--bg-soft); }
.comparator__cell {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-3);
  border-right: 1px solid var(--border);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comparator__cell:first-child  { text-align: left; justify-content: flex-start; font-weight: 500; color: var(--ink-2); }
.comparator__cell:last-child   { border-right: none; }
.comparator__check { color: var(--success); font-size: 16px; }
.comparator__cross { color: var(--border);  font-size: 16px; }
.comparator__highlighted .comparator__cell { font-weight: 600; }

/* ── BOOKING CARD URGENCY ─────────────────────────── */
.booking-card__urgency {
  background: #fff3cd;
  border-top: 1px solid #f0ad4e;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #7a4d00;
}
.booking-card__urgency i { color: #e85d04; font-size: 14px; }

.recently-booked {
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--stone);
  margin-top: 10px;
  border: 1px solid var(--border);
}
.recently-booked .dot {
  width: 8px; height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.5s ease-in-out infinite;
}
.recently-booked strong { color: var(--ink); }

/* ── MOBILE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .wa-float { bottom: 18px; right: 18px; }
  .wa-float__bubble { display: none !important; } /* hide on mobile */
  .sp-toast { left: 12px; right: 12px; max-width: calc(100% - 24px); bottom: 90px; }
  .quick-quote__grid { grid-template-columns: 1fr; }
  .comparator { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparator__header,
  .comparator__row { min-width: 480px; }
  .exit-popup__body { padding: 20px 20px 24px; }
  .exit-popup__offer-code { font-size: 26px; }
}
