.cp-overlay {
  position: fixed; inset: 0; background: rgba(15, 18, 25, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999999; padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cp-overlay.is-open { opacity: 1; pointer-events: auto; }

.cp-modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 420px;
  padding: 32px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(12px) scale(0.98); transition: transform 0.18s ease;
  box-sizing: border-box;
}
.cp-overlay.is-open .cp-modal { transform: translateY(0) scale(1); }
.cp-modal * { box-sizing: border-box; }

.cp-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px;
  border: none; background: #f1f2f4; border-radius: 50%; cursor: pointer;
  font-size: 15px; color: #55585e; line-height: 1; display: flex;
  align-items: center; justify-content: center; padding: 0;
}
.cp-close:hover { background: #e5e7eb; color: #1f2328; }

.cp-modal h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #16181d; line-height: 1.3; }
.cp-modal h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #16181d; }
.cp-modal p.cp-subtitle { margin: 0 0 14px; font-size: 14px; color: #5b5f66; }
.cp-modal p.cp-desc { margin: 0 0 20px; font-size: 13.5px; color: #767a82; line-height: 1.5; }

.cp-softask-actions, .cp-hero-actions { display: flex; gap: 10px; margin-top: 18px; }
.cp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 7px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  flex: 1; font-family: inherit;
}
.cp-btn-primary { background: #2563eb; color: #fff; }
.cp-btn-primary:hover { background: #1d4ed8; }
.cp-btn-red { background: #dc2626; color: #fff; }
.cp-btn-red:hover { background: #b91c1c; }
.cp-btn-outline { background: #fff; color: #383b42; border-color: #d7d9dd; }
.cp-btn-outline:hover { background: #f7f7f8; }

/* Soft-ask: OneSignal/PushEngage-style prompt — compact card anchored
   top-center, no page-dimming backdrop, unlike the modal system below. */
.cp-softask-banner {
  position: fixed; top: 20px; left: 50%; z-index: 999999;
  width: calc(100% - 40px); max-width: 360px;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  padding: 18px 20px; box-sizing: border-box;
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cp-softask-banner.is-open {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cp-softask-banner * { box-sizing: border-box; }
.cp-softask-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.cp-softask-icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none; background: #fdeaea;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.cp-softask-banner h2 { margin: 4px 0 0; font-size: 14.5px; font-weight: 600; color: #16181d; line-height: 1.4; }
.cp-softask-banner .cp-softask-actions { margin-top: 0; }

/* Main popup's entry point: sticky bar pinned to the bottom of the page. */
.cp-footer-alert {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999998;
  background: #fff; box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
  padding: 16px 48px 16px 20px;
  /* iOS home-indicator area — without this the bar's bottom edge (and its
     content) can sit partly under the gesture bar on notched iPhones. */
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box; width: 100%; max-width: 100%; overflow: hidden;
  display: flex; align-items: center; gap: 20px; flex-wrap: nowrap;
  opacity: 0; pointer-events: none; transform: translateY(100%);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.cp-footer-alert.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.cp-footer-alert * { box-sizing: border-box; }

.cp-footer-text { flex: 1 1 auto; min-width: 0; }
.cp-footer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fdeaea; color: #dc2626; font-size: 11px;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-bottom: 6px;
}
.cp-footer-heading {
  margin: 0 0 2px; font-size: 15px; font-weight: 700; color: #16181d;
  line-height: 1.35; overflow-wrap: break-word;
}
.cp-footer-desc {
  margin: 0; font-size: 13px; color: #6b6f76; line-height: 1.4;
  overflow-wrap: break-word;
}

.cp-footer-cta { flex: none; padding: 11px 20px; white-space: nowrap; }

.cp-footer-close {
  position: absolute; top: 10px; right: 12px; width: 26px; height: 26px;
  border: none; background: #f1f2f4; border-radius: 50%; cursor: pointer;
  font-size: 13px; color: #55585e; line-height: 1; display: flex;
  align-items: center; justify-content: center; padding: 0; flex: none;
}
.cp-footer-close:hover { background: #e5e7eb; color: #1f2328; }

/* Breathing red pulse next to the badge label — small, animated, subtle. */
.cp-pulse-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #dc2626; flex: none;
  animation: cp-pulse-breathe 1.8s ease-in-out infinite;
}
@keyframes cp-pulse-breathe {
  0%, 100% { transform: scale(0.75); opacity: 0.55; }
  50%      { transform: scale(1.15); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-pulse-dot { animation: none; }
}

/* Phones and small tablets — stack everything, full-width button, and
   push the close button down so it can't overlap the badge/heading. */
@media (max-width: 640px) {
  .cp-footer-alert {
    flex-direction: column; align-items: stretch;
    padding: 34px 16px 16px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  .cp-footer-close { top: 8px; right: 8px; }
  .cp-footer-cta { width: 100%; }
}

.cp-channel-list { display: flex; flex-direction: column; gap: 10px; }
.cp-channel-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; border-radius: 8px; border: 1px solid #e3e5e8;
  background: #fff; cursor: pointer; font-size: 14.5px; font-weight: 600;
  color: #24262b; text-align: left; font-family: inherit;
}
.cp-channel-btn:hover { border-color: #c6c9ce; background: #fafafb; }
.cp-channel-icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.cp-channel-icon svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.cp-icon-facebook { background: #1877f2; }
.cp-icon-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.cp-icon-whatsapp { background: #25d366; }
.cp-icon-telegram { background: #26a5e4; }
.cp-icon-email { background: #6b7280; }

.cp-form-field { margin-bottom: 14px; }
.cp-form-field label { display: block; font-size: 13px; font-weight: 600; color: #383b42; margin-bottom: 6px; }
.cp-form-field input[type="text"],
.cp-form-field input[type="email"] {
  width: 100%; padding: 10px 12px; border: 1px solid #d7d9dd; border-radius: 6px;
  font-size: 14px; font-family: inherit; color: #16181d;
}
.cp-form-field input:focus { outline: 2px solid #2563eb; outline-offset: 1px; }

.cp-consent-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.cp-consent-row input { margin-top: 3px; flex: none; }
.cp-consent-row label { font-size: 12.5px; color: #6b6f76; line-height: 1.4; }

.cp-back-link { display: inline-block; margin-bottom: 14px; font-size: 13px; color: #6b6f76; cursor: pointer; text-decoration: underline; background: none; border: none; padding: 0; font-family: inherit; }

.cp-error { color: #c0362c; font-size: 13px; margin: -6px 0 14px; }

.cp-success { text-align: center; padding: 12px 0 4px; }
.cp-success .cp-success-icon {
  width: 52px; height: 52px; border-radius: 50%; background: #eafaf0; color: #1a9c53;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  margin: 0 auto 16px;
}

/* Honeypot: visually hidden but present in the DOM/tab order for humans to skip naturally. */
.cp-hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

@media (max-width: 480px) {
  .cp-modal { padding: 24px; }
  .cp-softask-actions, .cp-hero-actions { flex-direction: column; }
}
