/* CPN Donations - Mobile-first */
.cpn-donations{
  --cpn-bg:#f6faff; --cpn-card:#fff; --cpn-primary:#7fb8ff; --cpn-primary2:#a8d0ff;
  --cpn-text:#0b1b2b; --cpn-muted:#5c6f86; --cpn-border:#e6eef7;

  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  color: var(--cpn-text);
  background: var(--cpn-bg-gradient);
  /* Optional background image (with overlay) */
  background-image: var(--cpn-bg-overlay), var(--cpn-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 18px;
  padding: 18px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  max-width: 100%;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  padding-top: calc(18px + env(safe-area-inset-top));
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Featured video under tagline */
.cpn-donations .cpn-featured-video{
  margin-top: 10px;
  border: 1px solid var(--cpn-border);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  transform: translateZ(0);
}
.cpn-donations .cpn-featured-video iframe{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 220px;
  display: block;
  border: 0;
  background: #000;
}
.cpn-donations .cpn-featured-video--notice{
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--cpn-text);
  background: rgba(255,255,255,.7);
}

/* Featured video thumbnail (lazy-load) */
.cpn-donations .cpn-featured-video--thumb .cpn-video-thumb{
  width: 100%;
  min-height: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
  cursor: pointer;
  position: relative;
}
.cpn-donations .cpn-featured-video--thumb img{
  width: 100%;
  min-height: 220px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.cpn-donations .cpn-featured-video--thumb .cpn-video-play{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.cpn-donations .cpn-featured-video--thumb .cpn-video-play:after{
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  width: 0; height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}
.cpn-donations .cpn-featured-video--thumb .cpn-video-thumb:hover .cpn-video-play{
  background: rgba(0,0,0,.55);
}

/* App mode: remove the outer "frame" and fill the viewport */
.cpn-donations.is-app{
  max-width: none;
  margin: 0;
  border-radius: 0;
}

/* Theme-proof links/buttons inside the widget */
.cpn-donations a,
.cpn-donations button{
  text-decoration: none !important;
  color: inherit !important;
  outline: none !important;
  box-shadow: none !important;
}
.cpn-donations a:focus,
.cpn-donations button:focus{
  outline: none !important;
  box-shadow: none !important;
}

.cpn-card{
  background: var(--cpn-card);
  text-align: center;
  border: 1px solid var(--cpn-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(10, 30, 60, .08);
}

.cpn-header{
  display:flex;
  gap: 12px;
  align-items:center;
}

.cpn-logo{width:var(--cpn-logo-size,96px);height:var(--cpn-logo-size,96px);display:flex;align-items:center;justify-content:center;}
.cpn-logo-fallback{
  width: 54px; height: 54px;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(127,184,255,.28), rgba(168,208,255,.22));
  border: 1px solid var(--cpn-border);
  display:grid; place-items:center;
}
.cpn-mark{
  width: 22px; height: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cpn-primary), var(--cpn-primary2)) !important;
  box-shadow: 0 12px 22px rgba(127,184,255,.35);
}

.cpn-brand{min-width:0}
.cpn-org{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
  line-height: 1.2;
}
.cpn-tagline{
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--cpn-muted);
}

.cpn-socials{
  margin-top: 12px;
  display:flex;
  justify-content:center;
  gap: 10px;
}
.cpn-ic{
  width: 38px; height: 38px;
  display:grid; place-items:center;
  border-radius: 999px;
  background: rgba(127,184,255,.10);
  border: 1px solid var(--cpn-border);
  transition: transform .12s ease, background .12s ease;
}
.cpn-ic svg{ width: 18px; height: 18px; fill: var(--cpn-text); opacity: .9; transition: fill .12s ease, opacity .12s ease; }
.cpn-ic:hover,
.cpn-ic:focus{
  transform: translateY(-1px);
  background: var(--cpn-primary);
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  outline: none !important;
}
.cpn-ic:hover svg,
.cpn-ic:focus svg{ fill: var(--cpn-primary-text); opacity: 1; }

.cpn-cta{
  margin-top: 12px;
  width: 100%;
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  padding: 11px 12px;
  border-radius: 999px;
  background: var(--cpn-cta-bg);
  color: var(--cpn-cta-text);
  border: 1px solid rgba(255,255,255,.55) !important;
  box-shadow: 0 16px 35px rgba(10,30,60,.10);
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

/* Force plugin styling on hover/focus (avoid theme/WordPress defaults) */
.cpn-cta:hover,
.cpn-cta:focus,
.cpn-cta:active{
  background: var(--cpn-primary) !important;
  color: var(--cpn-primary-text) !important;
  border-color: rgba(255,255,255,.55) !important;
  box-shadow: 0 18px 38px rgba(0,0,0,.14) !important;
  outline: none !important;
}
.cpn-cta:visited{ color: var(--cpn-cta-text) !important; }
.cpn-cta:focus{ outline: none !important; }
.cpn-cta:focus-visible{
  box-shadow: 0 0 0 3px rgba(127,184,255,.45), 0 16px 35px rgba(10,30,60,.10);
}
.cpn-cta svg{ width: 18px; height: 18px; fill: currentColor; }

.cpn-availability{
  margin-top: 10px;
  text-align:center;
  font-size: 12px;
  color: var(--cpn-muted);
}

.cpn-actions{
  margin-top: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.cpn-btn{
  width: 100%;
  appearance:none !important;
  -webkit-appearance:none !important;
  text-decoration:none !important;

  border: 1px solid rgba(255,255,255,.55) !important;
  background: linear-gradient(135deg, var(--cpn-primary), var(--cpn-primary2)) !important;
  color: #0b1b2b !important;
  padding: 12px 14px;
  border-radius: 14px !important;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(127,184,255,.25);
  transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.cpn-btn:hover{ transform: translateY(-1px); filter: saturate(1.05); }
.cpn-btn:active{ transform: translateY(0px) scale(.99); }
.cpn-btn:focus{ outline:none !important; }
.cpn-btn:focus-visible{ box-shadow: 0 0 0 3px rgba(127,184,255,.45), 0 18px 45px rgba(127,184,255,.25); }

.cpn-btn-ghost{
  border: 1px solid var(--cpn-border);
  box-shadow: 0 14px 35px rgba(10,30,60,.06);
}

.cpn-note{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  font-size: 12px;
  color: var(--cpn-muted);
  opacity: .95;
}
.cpn-dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--cpn-primary);
  box-shadow: 0 0 0 5px rgba(127,184,255,.15);
}

/* Modal */
.cpn-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display:none;
}

/* Open state: use a neutral overlay that does NOT depend on 100vw math */
.cpn-modal.is-open{
  display:block;
  box-sizing:border-box;
}

/* Backdrop always covers the viewport */
.cpn-modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, .55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .20s ease;
}

/* Card is centered by fixed positioning (viewport-true, Elementor-proof) */
.cpn-modal-card{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.98) translateZ(0);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;

  width: min(680px, calc(100% - 32px));
  max-height: calc(100% - 48px);

  display: flex;
  flex-direction: column;
  background: var(--cpn-card);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.55) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  overflow: hidden;
}

/* Visible state (animated in) */
.cpn-modal.is-visible .cpn-modal-backdrop{ opacity: 1; }
.cpn-modal.is-visible .cpn-modal-card{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) translateZ(0);
}

@media (prefers-reduced-motion: reduce){
  .cpn-modal-backdrop,
  .cpn-modal-card{ transition: none !important; }
}

/* While open, prevent rubber-band scrolling on some mobile browsers */
body.cpn-modal-open{ overscroll-behavior: none; }


/* Extra safety: keep close button on the right even under aggressive theme CSS */
.cpn-modal-card .cpn-modal-close{
  left: auto !important;
  right: 14px !important;
  top: 14px !important;
  float: none !important;
}
.cpn-modal-x{ display:none !important; }

.cpn-modal-close{
  /* Hard reset to prevent theme styles bleeding in */
  all: unset !important;
  position: absolute;
  inset: 12px 12px auto auto;
  left: auto !important;
  right: 12px !important;
  top: 12px !important;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
  user-select: none;

  /* Encapsulated look */
  background: rgba(0,0,0,.04) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  color: var(--cpn-primary) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.14) !important;
}
.cpn-modal-close:hover{
  background: var(--cpn-primary) !important;
  border-color: var(--cpn-primary) !important;
  color: #fff !important;
  transform: translateY(-1px);
  filter: none;
}

/* Prevent theme/WordPress focus rings from overriding the encapsulated design */
.cpn-modal-close:focus,
.cpn-modal-close:active,
.cpn-modal-close:focus-visible{
  outline: none !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.14) !important;
}
.cpn-modal-close:active{ transform: translateY(0px); }
.cpn-modal-close:focus,
.cpn-modal-close:active,
.cpn-modal-close:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(127,184,255,.45), 0 10px 22px rgba(0,0,0,.14) !important;
}

.cpn-modal-close .dashicons{
  display:block;
  width:auto;
  height:auto;
  font-size: 20px;
  line-height: 1;
}

/* Hardening against theme CSS overrides (some themes move/float buttons) */
.cpn-modal-close{
  left: auto !important;
  right: 12px !important;
  float: none !important;
  margin: 0 !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
}

/* If the close button contains text + an icon (e.g., FontAwesome), force icon to the RIGHT */
.cpn-modal-close .fa,
.cpn-modal-close i,
.cpn-modal-close svg{
  order: 2;
}
.cpn-modal-close .cpn-close-text,
.cpn-modal-close .screen-reader-text{
  order: 1;
}

.cpn-sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* Ensure theme/global WP button hover rules never bleed into our CTA */
.cpn-cta,
.cpn-cta:hover,
.cpn-cta:focus,
.cpn-cta:focus-visible{
  background: var(--cpn-primary) !important;
  color: #fff !important;
}
.cpn-cta:hover{ background: var(--cpn-primary-dark) !important; }
.cpn-cta:active{ background: var(--cpn-primary-dark) !important; color: #fff !important; }

/* Social icons: add a clean hover/active effect */
.cpn-social a{
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.cpn-social a:hover{
  background: var(--cpn-primary) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.cpn-social a:active{ transform: translateY(0px); }


/* Floating close button (under the modal) */
.cpn-modal-fab-close{
  all: unset !important;
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 100000;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.25) !important;
}
.cpn-modal-fab-close span[aria-hidden="true"]{
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  color: rgba(0,0,0,.75);
  transform: translateY(-1px);
}
.cpn-modal-fab-close:hover{
  background: var(--cpn-primary) !important;
  border-color: var(--cpn-primary) !important;
}
.cpn-modal-fab-close:hover span[aria-hidden="true"]{ color:#fff; }
.cpn-modal-fab-close:focus,
.cpn-modal-fab-close:active,
.cpn-modal-fab-close:focus-visible{
  outline:none !important;
}

.cpn-modal-body{
  padding: 18px;
  /* Scroll inside the modal when content is taller than the screen */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar (keep scroll working) */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge legacy */
  /* Works with .cpn-modal-card {display:flex} to keep content inside viewport */
  flex: 1 1 auto;
  min-height: 0;
}

/* WebKit scrollbar hide */

/* Modal hardening (prevents horizontal scroll + input overflow on mobile) */
.cpn-modal, .cpn-modal *{ box-sizing: border-box; }
.cpn-modal{ max-width: 100vw; overflow-x: hidden; }
.cpn-modal-card{ max-width: calc(100vw - 48px); }
.cpn-modal-body{ overflow-x: hidden; }
.cpn-modal-body *{ max-width: 100%; min-width: 0; }
.cpn-modal-body input, .cpn-modal-body select, .cpn-modal-body textarea{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* Visual consistency across mobile browsers (especially iOS) */
  font-size: 14px;
  line-height: 1.2;
  padding: 12px 12px;
}
.cpn-modal-body input[type="date"]{
  -webkit-appearance: none;
  appearance: none;
  /* Make date inputs match other fields height on mobile */
  height: 44px;
  padding: 12px 12px;
  line-height: 1.2;
}

/* Keep all form controls visually aligned (exclude checkbox/radio/buttons) */
.cpn-modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.cpn-modal-body select{
  height: 44px;
}

/* iOS sometimes ignores height on date; reinforce */
@supports (-webkit-touch-callout: none) {
  .cpn-modal-body input[type="date"]{ height: 44px; }
}

/* iOS sometimes ignores height for date inputs; reinforce */
@supports (-webkit-touch-callout: none) {
  .cpn-modal-body input[type="date"]{ height: 44px; }
}

.cpn-modal-body::-webkit-scrollbar{ width: 0; height: 0; }

.cpn-modal-title{
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 8px 0;
}
.cpn-modal-sub{
  margin: 0 0 14px 0;
  color: var(--cpn-muted);
  font-size: 12.5px;
}

.cpn-qr{
  width: 100%;
  display:grid;
  place-items:center;
  padding: 12px;
  border-radius: calc(var(--cpn-logo-size) * 0.25);
  border: 1px dashed var(--cpn-border);
  background: rgba(127,184,255,.08);
  margin-bottom: 12px;
}
.cpn-qr img{
  width: min(260px, 72vw);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--cpn-border);
  background: #fff;
}

.cpn-info{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.cpn-pill{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
  border-radius: 14px !important;
  border: 1px solid var(--cpn-border);
  background: rgba(255,255,255,.85);
}
.cpn-pill strong{ font-size: 12px; color: var(--cpn-muted); font-weight: 800; }
.cpn-pill span{ font-size: 13px; font-weight: 800; word-break: break-word; }

.cpn-link{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  background: linear-gradient(135deg, var(--cpn-primary), var(--cpn-primary2)) !important;
  color: #0b1b2b !important;
  font-weight: 900;
}

.cpn-form{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.cpn-form label{
  font-size: 12px;
  font-weight: 800;
  color: var(--cpn-muted);
}
.cpn-input, .cpn-select, .cpn-textarea{
  width: 100%;
  border: 1px solid var(--cpn-border);
  border-radius: 14px !important;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  background: rgba(255,255,255,.92);
  box-sizing:border-box;

  min-height: 48px; /* normalize field height */
}
.cpn-textarea{ min-height: 96px; resize: vertical; }

/* Mobile: normalize native date input height (iOS/Android) */
.cpn-modal-card input.cpn-input[type="date"],
.cpn-modal-card .cpn-input[type="date"]{
  -webkit-appearance: none;
  appearance: none;
  height: 48px;
  min-height: 48px;
  padding: 0 12px !important;     /* iOS ignores vertical padding */
  line-height: 48px !important;    /* forces visual height */
  background-clip: padding-box;
}

/* Extra iOS safety */
@supports (-webkit-touch-callout: none) {
  .cpn-modal-card input.cpn-input[type="date"],
  .cpn-modal-card .cpn-input[type="date"]{
    height: 48px;
    line-height: 48px !important;
  }
}

.cpn-row2{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.cpn-help{
  font-size: 12px;
  color: var(--cpn-muted);
  margin-top: -4px;
}
.cpn-toast{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px !important;
  border: 1px solid var(--cpn-border);
  background: rgba(127,184,255,.10);
  font-size: 13px;
  font-weight: 700;
  color: var(--cpn-text);
  display:none;
}
.cpn-toast.is-show{ display:block; }

@media (min-width: 560px){
  .cpn-row2{ grid-template-columns: 1fr 1fr; }
  .cpn-donations{ padding: 22px; }
}


/* Vertical header */
.cpn-header-vertical{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
}

.cpn-logo-top{
  width: var(--cpn-logo-size);
  height: var(--cpn-logo-size);
  object-fit: contain;
  border-radius: 16px;
  background: rgba(127,184,255,.12);
  border: 1px solid var(--cpn-border);
}

.cpn-logo-fallback-top{
  width: var(--cpn-logo-size); height: var(--cpn-logo-size);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(127,184,255,.28), rgba(168,208,255,.22));
  border: 1px solid var(--cpn-border);
  display:grid; place-items:center;
}

.cpn-org-top{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 20px;
  line-height: 1.15;
}

.cpn-desc-top{
  margin-top: -2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cpn-muted);
  max-width: 44ch;
}

/* Footer UI */
.cpn-spacer{ flex: 1; }

.cpn-footer-ui{
  text-align:center;
  padding: 6px 4px 0 4px;
}

.cpn-footer-text{
  font-size: 12px;
  color: var(--cpn-muted);
  line-height: 1.4;
  font-weight: 700;
}

.cpn-footer-mini{
  margin-top: 6px;
  font-size: 11px;
  opacity: .85;
}
.cpn-footer-mini a{
  color: var(--cpn-text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(11,27,43,.25);
}


/* Customizable ghost buttons */
.cpn-btn-schedule{
  background: var(--cpn-schedule-bg);
  color: var(--cpn-schedule-text);
}
.cpn-btn-report{
  background: var(--cpn-report-bg);
  color: var(--cpn-report-text);
}
.cpn-btn-campaigns{
  background: linear-gradient(135deg, var(--cpn-primary2), var(--cpn-primary));
  color: var(--cpn-text);
}
.cpn-btn-campaigns:hover,
.cpn-btn-campaigns:focus,
.cpn-btn-campaigns:focus-visible{
  background: linear-gradient(135deg, var(--cpn-primary), var(--cpn-primary2)) !important;
  color: var(--cpn-text) !important;
}
.cpn-btn-schedule:hover,
.cpn-btn-schedule:focus,
.cpn-btn-schedule:focus-visible{
  background: var(--cpn-schedule-bg-hover) !important;
  color: var(--cpn-schedule-text-hover) !important;
}
.cpn-btn-report:hover,
.cpn-btn-report:focus,
.cpn-btn-report:focus-visible{
  background: var(--cpn-report-bg-hover) !important;
  color: var(--cpn-report-text-hover) !important;
}


/* Hover customization */
.cpn-cta:hover{
  background: var(--cpn-cta-bg-hover) !important;
  color: var(--cpn-cta-text-hover) !important;
  border-color: rgba(255,255,255,.65) !important;
}

.cpn-cta:active,
.cpn-cta:focus,
.cpn-cta:focus-visible{
  background: var(--cpn-cta-bg-hover) !important;
  color: var(--cpn-cta-text-hover) !important;
  border-color: rgba(255,255,255,.65) !important;
}


/* Touch-friendly active states (mobile feels like an app) */
@media (hover: none) and (pointer: coarse){
  .cpn-cta:active{
    background: var(--cpn-cta-bg-hover) !important;
    color: var(--cpn-cta-text-hover) !important;
    transform: translateY(1px);
  }
  .cpn-btn-schedule:active{
    background: var(--cpn-schedule-bg-hover) !important;
    color: var(--cpn-schedule-text-hover) !important;
    transform: translateY(1px);
  }
  .cpn-btn-report:active{
    background: var(--cpn-report-bg-hover) !important;
    color: var(--cpn-report-text-hover) !important;
    transform: translateY(1px);
  }
}


/* Campaigns (premium) */
.cpn-modal-card--wide{ max-width: 980px; }

.cpn-camps{ max-height: min(74vh, 640px); overflow:auto; padding: 6px; }
.cpn-camps-controls{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media(min-width:720px){
  .cpn-camps-controls{ grid-template-columns: 1.3fr 1fr .7fr; align-items:center; }
}
.cpn-camps-search .cpn-input{
  width:100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--cpn-border);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  color: var(--cpn-text);
}
.cpn-camps-filters{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.cpn-chip{
  border:1px solid var(--cpn-border);
  background: rgba(255,255,255,.78);
  color: var(--cpn-text) !important;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
}
.cpn-chip:hover{ background: rgba(255,255,255,.92); }
.cpn-chip:active{ transform: translateY(1px); }
.cpn-chip.is-active{
  background: linear-gradient(135deg, rgba(127,184,255,.28), rgba(168,208,255,.22));
  border-color: rgba(127,184,255,.45);
}

.cpn-camps-sort .cpn-select{
  width:100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--cpn-border);
  background: #fff;
  font-weight: 900;
  font-size: 13px;
}

/* Campaign cards list: ALWAYS 1 per row (desktop included). Use !important to beat theme CSS. */
.cpn-camps-list{ display:grid; grid-template-columns:1fr !important; gap:12px; }
@media(min-width:720px){ .cpn-camps-list{ grid-template-columns: 1fr !important; } }

/* Desktop polish: keep Campaigns controls tidy + show more cards */
@media(min-width:1024px){
  .cpn-modal-card--wide{ max-width: 1080px; }

  .cpn-camps-controls{
    grid-template-columns: 1.35fr 1fr .65fr;
    gap: 12px;
    align-items: center;
  }

  .cpn-camps-filters{
    justify-content: center;
    flex-wrap: nowrap;
  }

  .cpn-chip{
    white-space: nowrap;
    min-width: 0;
    padding: 10px 14px;
  }

  .cpn-camps-list{ grid-template-columns: 1fr !important; gap: 14px; }

  /* Keep desktop exactly like mobile: 1 card per row, media on top, content below. */
}


.cpn-camps-loader{ text-align:center; padding:10px; color: var(--cpn-muted); font-weight:800; font-size: 12px; }
.cpn-camps-more{ width:100%; margin-top: 6px; }

.cpn-camp-card{
  display: block !important;
  background: rgba(255,255,255,.92);
  border:1px solid var(--cpn-border);
  border-radius: 18px;
  overflow:hidden;
  box-shadow:0 18px 40px rgba(10,30,60,.06);
  cursor:pointer;
  outline: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cpn-camp-card:hover{ transform: translateY(-1px); box-shadow:0 20px 45px rgba(10,30,60,.10); }
.cpn-camp-card:active{ transform: translateY(0px); }
.cpn-camp-card:focus-visible{ box-shadow:0 0 0 3px rgba(127,184,255,.35), 0 18px 40px rgba(10,30,60,.08); }

.cpn-camp-media{ width:100%; aspect-ratio: 16/10; background: rgba(127,184,255,.12); overflow:hidden; }
.cpn-camp-media img{ width:100%; height:100%; object-fit:cover; display:block; }

.cpn-camp-body{ padding: 14px; }
.cpn-camp-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.cpn-camp-title{ font-size: 15px; font-weight: 950; color: var(--cpn-text); letter-spacing: -0.01em; line-height: 1.15; }

/* Pills group (status + view more) */
.cpn-camp-pills{
  display:flex;
  align-items:center;
  gap:8px;
  flex: 0 0 auto;
}
.cpn-camp-pill{
  flex: 0 0 auto;
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 11px;
  border: 1px solid transparent;
}
.cpn-camp-pill--active{
  background: rgba(59,207,155,.14);
  border-color: rgba(59,207,155,.28);
}
.cpn-camp-pill--done{
  background: rgba(127,184,255,.18);
  border-color: rgba(127,184,255,.30);
}

.cpn-camp-pill--paused{
  background: rgba(255,193,7,.18);
  border-color: rgba(255,193,7,.32);
}

/* View more pill: same size as status pill, but uses theme color on hover/active */
/*
  GOLD FINAL NOTE:
  Some WP themes/plugins inject generic <button>/<a> styles (including odd pink borders).
  "View more" must ALWAYS keep our pill design and theme colors.
*/
.cpn-donations .cpn-camp-pill--more,
.cpn-donations button.cpn-camp-pill--more,
.cpn-donations a.cpn-camp-pill--more{
  -webkit-appearance:none;
  appearance:none;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
  outline: 0 !important;
  cursor:pointer;
  /* Same visual system as the ACTIVE badge (requested) */
  background:#eafff4 !important;
  border:1px solid #bdebd4 !important;
  color:#0b3b2b !important;
  box-shadow: 0 8px 18px rgba(10,30,60,.04) !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.cpn-donations .cpn-camp-pill--more:hover{
  background:#ddfff0;
  border-color:#bdebd4;
  color:#0b3b2b;
}
.cpn-donations .cpn-camp-pill--more:active{
  transform: translateY(1px);
}

/*
  EXTRA HARDENING (themes):
  Some WP themes/plugins apply aggressive button/link styles with higher specificity.
  This rule forces our pill look on the actual element types used by the UI.
*/
/* Keep the SAME pill system as Active (no theme/WordPress overrides) */
.cpn-donations button.cpn-camp-pill.cpn-camp-pill--more,
.cpn-donations a.cpn-camp-pill.cpn-camp-pill--more{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: auto !important;
  /* match the normal pill height so it doesn't look "skinny" */
  padding: 7px 10px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  background:#eafff4 !important;
  border:1px solid #bdebd4 !important;
  color:#0b3b2b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .1px !important;
  text-decoration: none !important;
  outline: 0 !important;
}
.cpn-donations .cpn-camp-pill--more:focus,
.cpn-donations .cpn-camp-pill--more:focus-visible{
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(127,184,255,.35), 0 10px 22px rgba(10,30,60,.10) !important;
}

/* Back pill (post view): same shape as the other pills, theme-aware */
.cpn-donations .cpn-camp-pill--back{
  -webkit-appearance: none;
  appearance: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0 12px;
  height: auto;
  border-radius: 999px;
  border: 1px solid rgba(11,27,43,.14);
  background: rgba(11,27,43,.04);
  color: var(--cpn-primary);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.cpn-donations .cpn-camp-pill--back:hover{
  background: rgba(11,27,43,.06);
  border-color: rgba(11,27,43,.18);
}
.cpn-donations .cpn-camp-pill--back:active{
  transform: translateY(1px);
}

.cpn-camp-desc{ margin-top:8px; color: var(--cpn-muted); font-size: 13px; line-height:1.35; }
.cpn-camp-meta{ display:flex; justify-content:space-between; gap:10px; margin-top:10px; color: var(--cpn-muted); font-size: 12px; font-weight: 800; }
.cpn-progress{
  margin-top:10px;
  height: 10px;
  background: rgba(11,27,43,.08);
  border-radius:999px;
  overflow:hidden;
  position:relative;
}
.cpn-progress-fill{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width: var(--cpn-pct, 0%);
  background: var(--cpn-primary);
  border-radius:999px;
  transform:none;
  animation: cpnProgressFill .6s ease both;
}
.cpn-progress--pct .cpn-progress-label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 950;
  color:#fff;
  pointer-events:none;
}
@keyframes cpnProgressFill{
  from{ width:0%; }
  to{ width: var(--cpn-pct, 0%); }
}

.cpn-camp-foot{ display:flex; justify-content:space-between; align-items:center; gap: 10px; margin-top: 12px; }
.cpn-camp-actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cpn-camp-pct{ font-weight: 950; font-size: 12px; color: var(--cpn-text); opacity: .9; }
.cpn-share{
  -webkit-appearance:none;
  appearance:none;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid var(--cpn-border);
  background: rgba(255,255,255,.70);
  font-weight:950;
  font-size: 12px;
  cursor:pointer;
}

/* -------------------------------
   Campaign "Post View" (in-modal)
   Keeps an app-like feel and avoids WordPress theme styling.
------------------------------- */
.cpn-camps-view{ width: 100%; }
.cpn-camps-post{ width: 100%; }
.cpn-post-header{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 8px 0 10px; }
.cpn-post-back{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--cpn-border);
  border: 1px solid var(--cpn-border);
  color: var(--cpn-text);
  font-weight: 700;
}
.cpn-donations .cpn-post-back{
  /* Hard override: prevent WP/Elementor button theme borders (pink outlines, etc.) */
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
  outline: none;
}
.cpn-donations .cpn-post-back:focus,
.cpn-donations .cpn-post-back:focus-visible{
  box-shadow: 0 0 0 3px rgba(59,207,155,.22) !important;
  border-color: var(--cpn-primary) !important;
}

/* If the modal is moved/ported outside .cpn-donations, still keep our look */
.cpn-modal .cpn-post-back{
  border-color: var(--cpn-border) !important;
  background: rgba(255,255,255,.92) !important;
  color: var(--cpn-text) !important;
  box-shadow: none !important;
  outline: none !important;
}
.cpn-modal .cpn-post-back:focus,
.cpn-modal .cpn-post-back:focus-visible{
  box-shadow: 0 0 0 3px rgba(59,207,155,.22) !important;
  border-color: var(--cpn-primary) !important;
}
.cpn-post-back:hover{ filter: brightness(0.98); }
.cpn-post-share{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cpn-border);
  color: var(--cpn-text);
  font-weight: 700;
}
.cpn-donations .cpn-post-actions .cpn-share{
  /* Our share button inside post view uses .cpn-share */
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cpn-border);
  color: var(--cpn-text);
  font-weight: 800;
  letter-spacing: .01em;
  -webkit-appearance:none;
  appearance:none;
  box-shadow:none !important;
}
.cpn-donations .cpn-post-actions .cpn-share:hover{ background: var(--cpn-border); }
.cpn-donations .cpn-post-actions .cpn-share:active,
.cpn-donations .cpn-post-actions .cpn-share.is-active,
.cpn-donations .cpn-post-actions .cpn-share:focus-visible{
  background: var(--cpn-cta-bg, var(--cpn-primary)) !important;
  color: var(--cpn-cta-text, #ffffff) !important;
  border-color: transparent !important;
  box-shadow: 0 10px 22px rgba(10,30,60,.12) !important;
}

.cpn-post-hero-btn{
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  display:block;
  cursor: zoom-in;
}

/* Status badge in post view */
.cpn-donations .cpn-post-meta .cpn-badge{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid var(--cpn-border);
  background: #fff;
  color: var(--cpn-text);
}
.cpn-donations .cpn-post-meta .cpn-badge.cpn-badge-active{
  background: rgba(126,233,200,.28);
  border-color: rgba(126,233,200,.45);
}
.cpn-donations .cpn-post-meta .cpn-badge.cpn-badge-done{
  background: rgba(59,207,155,.14);
  border-color: rgba(59,207,155,.35);
}

/* Progress bar in post view */
.cpn-donations .cpn-post-stats .cpn-progress{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(6,37,28,.08);
  overflow: hidden;
}
.cpn-donations .cpn-post-stats .cpn-progress > span{
  display:block;
  height: 10px;
  background: var(--cpn-primary);
  border-radius: 999px;
}

/* Image lightbox */
.cpn-imgbox{ position: fixed; inset: 0; z-index: 99999; display:flex; align-items:center; justify-content:center; }
.cpn-imgbox-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.55); }
.cpn-imgbox-card{ position: relative; width: min(92vw, 980px); max-height: 86vh; border-radius: 18px; overflow:hidden; border: 1px solid rgba(255,255,255,.18); background:#111; box-shadow: 0 22px 60px rgba(0,0,0,.35); }
.cpn-imgbox-img{ width: 100%; height: 100%; max-height: 86vh; object-fit: contain; display:block; }
.cpn-imgbox-close{ position:absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22) !important; background: rgba(0,0,0,.45) !important; color:#fff !important; font-size: 26px; line-height: 1; display:flex; align-items:center; justify-content:center; cursor:pointer; -webkit-appearance:none; appearance:none; box-shadow:none !important; }
.cpn-imgbox-close:hover{ background: rgba(0,0,0,.60) !important; }
.cpn-post-share:hover{ background: var(--cpn-border); }
.cpn-post-hero{ border-radius: 18px; overflow:hidden; border: 1px solid var(--cpn-border); background:#fff; }
.cpn-post-hero img{ width: 100%; height: auto; display:block; object-fit:cover; }
.cpn-post-body{ padding: 14px 2px 4px; }
.cpn-post-title{ font-size: 20px; margin: 0 0 6px; letter-spacing: -0.02em; }
.cpn-post-meta{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom: 10px; }
.cpn-post-pill{ display:inline-flex; align-items:center; gap:8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--cpn-border); background:#fff; font-weight: 800; font-size: 12px; }
.cpn-post-status{ background: rgba(126,233,200,.28); }
.cpn-post-stats{ display:flex; gap:10px; flex-wrap:wrap; margin: 6px 0 8px; }
.cpn-post-stat{ flex: 1 1 140px; border: 1px solid var(--cpn-border); border-radius: 14px; padding: 10px 12px; background:#fff; }
.cpn-post-stat span{ display:block; font-size: 12px; color: var(--cpn-muted); font-weight: 700; margin-bottom: 4px; }
.cpn-post-stat b{ display:block; font-size: 14px; color: var(--cpn-text); }
.cpn-post-progress{
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(6,37,28,.10);
  overflow: hidden;
}
.cpn-post-progress > i{
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cpn-primary), var(--cpn-primary2));
  border-radius: 999px;
  transition: width .75s ease;
}
.cpn-post-progress > b{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .2px;
  color: var(--cpn-text);
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
  pointer-events: none;
}
.cpn-post-content{ margin-top: 12px; border-top: 1px solid var(--cpn-border); padding-top: 12px;  text-align: justify; text-justify: inter-word;}
.cpn-post-content p{ margin: 0 0 10px; color: var(--cpn-muted); line-height: 1.6; }
.cpn-post-content h2,.cpn-post-content h3{ margin: 14px 0 8px; color: var(--cpn-text); }
.cpn-post-content ul,.cpn-post-content ol{ margin: 0 0 12px 18px; color: var(--cpn-muted); }
.cpn-post-content a{ color: var(--cpn-primary); text-decoration: underline; }

/* Mobile breathing room */
@media (max-width: 520px){
  .cpn-post-title{ font-size: 18px; }
  .cpn-post-stat{ flex: 1 1 100%; }
}
.cpn-share:hover{ background: rgba(255,255,255,.88); }


.cpn-donations .cpn-share:active,
.cpn-donations .cpn-share.is-active,
.cpn-donations .cpn-share:focus-visible{
  background: var(--cpn-cta-bg, var(--cpn-primary)) !important;
  color: var(--cpn-cta-text, #ffffff) !important;
  border-color: transparent !important;
  box-shadow: 0 10px 22px rgba(10,30,60,.12);
}
.cpn-donations .cpn-share.is-active:hover{
  background: var(--cpn-cta-bg-hover, var(--cpn-primary2)) !important;
  color: var(--cpn-cta-text-hover, var(--cpn-text)) !important;
}
.cpn-flash{
  animation: cpnFlash 1.2s ease-in-out 1;
}
@keyframes cpnFlash{
  0%{ box-shadow:0 0 0 0 rgba(127,184,255,.0), 0 18px 40px rgba(10,30,60,.06); }
  40%{ box-shadow:0 0 0 6px rgba(127,184,255,.28), 0 18px 40px rgba(10,30,60,.10); }
  100%{ box-shadow:0 0 0 0 rgba(127,184,255,.0), 0 18px 40px rgba(10,30,60,.06); }
}

.cpn-empty{
  text-align:center;
  padding: 16px 12px;
  color: var(--cpn-muted);
  font-weight: 850;
  font-size: 13px;
}


/* App overlay close button (top-left) */
.cpn-app-close{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: calc(env(safe-area-inset-left, 0px) + 10px);
  z-index: 1000000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.82);
  color: var(--cpn-text);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 14px 35px rgba(10,30,60,.08);
  cursor: pointer;
  user-select: none;
}
.cpn-app-close:hover{ background: rgba(255,255,255,.92); }
.cpn-app-close:active{ transform: translateY(1px); }
.cpn-app-close-x{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: rgba(11,27,43,.08);
  font-size: 14px;
  font-weight: 1000;
}

/* Give overlay a little room for the close button */
.cpn-app-mode .cpn-wrap{
  padding-top: calc(env(safe-area-inset-top, 0px) + 52px);
}


/* Install banner (mobile) */
.cpn-install-banner{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1000001;
  display: none;
}
.cpn-install-inner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  box-shadow: 0 18px 45px rgba(10,30,60,.12);
  backdrop-filter: blur(10px);
}
.cpn-install-text{
  flex:1 1 auto;
  font-size: 13px;
  font-weight: 900;
  color: var(--cpn-text);
  line-height: 1.25;
}
.cpn-install-actions{display:flex;gap:10px;align-items:center}
.cpn-install-btn{
  border:none;
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--cpn-primary);
  color: #0b1b2b !important;
  font-weight: 1000;
  font-size: 12px;
  cursor:pointer;
}
.cpn-install-x{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.72);
  color: var(--cpn-text);
  font-weight: 1000;
  font-size: 18px;
  line-height: 1;
  cursor:pointer;
}
.cpn-install-banner.is-show{display:block}

/* Install sheet */
.cpn-install-sheet{position:fixed; inset:0; z-index:1000002; display:none;}
.cpn-install-sheet.is-show{display:block;}
.cpn-install-sheet-backdrop{position:absolute; inset:0; background: rgba(11,27,43,.45); backdrop-filter: blur(6px);}
.cpn-install-sheet-card{
  position:absolute;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: rgba(255,255,255,.96);
  border:1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 22px 55px rgba(10,30,60,.18);
}
.cpn-install-sheet-title{font-size:16px;font-weight:1000;color:var(--cpn-text);margin-bottom:8px}
.cpn-install-line{margin:6px 0;color:var(--cpn-muted);font-weight:800;font-size:13px;line-height:1.35}
.cpn-install-ok{
  margin-top: 10px;
  width: 100%;
  border:none;
  border-radius: 14px !important;
  padding: 12px 14px;
  background: rgba(127,184,255,.20);
  color: var(--cpn-text);
  font-weight: 1000;
  cursor:pointer;
}

/* Basic isolation (avoid theme styles bleeding in) */
.cpn-donations, .cpn-donations *{box-sizing:border-box;}
.cpn-donations button{font-family:inherit;}

/* App / Fullscreen overlay mode */
.cpn-donations-app{
  position:fixed;
  inset:0;
  z-index:999999;
  background: var(--cpn-bg-gradient, linear-gradient(180deg,#dbeafe 0%, #eff6ff 40%, #ffffff 100%));
  overflow:auto;
  padding:24px;
}
.cpn-donations-app .cpn-donations{
  max-width:620px;
  margin:0 auto;
}
.cpn-app-close{
  position:fixed;
  top:10px;
  left:10px;
  z-index:1000000;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.10);
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
  text-decoration:none;
  color:rgba(15,23,42,.9);
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}
.cpn-app-close strong{font-size:16px;line-height:1;}


/* Theme isolation */
.cpn-donations, .cpn-donations *{box-sizing:border-box;}
.cpn-donations a{color: inherit; text-decoration: none;}
.cpn-donations button, .cpn-donations input, .cpn-donations select, .cpn-donations textarea{
  font-family: inherit;
}
.cpn-donations button{
  appearance: none;
  -webkit-appearance: none;
}

/* ==============================
   GOLD UI FIXES (Modal safe area)
   ============================== */

/* Make the modal container a flexbox with padding so the card never clips
   top/bottom ("bleed" / safe area) and can scroll internally when needed. */
.cpn-modal{
  /* Keep hidden by default (base styles set display:none). We only adjust scrolling behavior here. */
  overflow:auto !important; /* allows scroll if viewport is tiny */
}

/* Only when open, apply safe-area padding so the card never clips top/bottom */
.cpn-modal.is-open{
  padding:24px 14px !important; /* safe area top/bottom + sides (desktop/tablet) */
}

@media (max-width: 480px){
  /* On phones, give the modal more vertical “breathing room” */
  .cpn-modal.is-open{ padding:72px 12px !important; }
  /* Match card max-height to the increased safe area (72px top + 72px bottom) */
  .cpn-modal-card{ max-height:calc(100vh - 144px) !important; }
}

/* Ensure the card respects the safe area */
.cpn-modal-card{
  margin:0 !important;
  width:min(820px, 100%) !important;
  max-height:calc(100vh - 48px); /* 24px top + 24px bottom (base) */
}

/* Strong override: close button must stay top-right, regardless of theme */
.cpn-modal-close{
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  left:auto !important;
  float:none !important;
  margin:0 !important;
}

/* ================================
   GOLD OVERRIDES (Button Styling)
   Purpose: Prevent theme/Elementor/WP button styles (pink borders, shadows)
   from leaking into CPN Campaign controls.
   ================================ */
.cpn-donations .cpn-chip,
.cpn-donations .cpn-share{
  -webkit-appearance:none;
  appearance:none;
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 1px solid var(--cpn-border) !important;
  box-shadow: none !important;
  outline: none !important;
  background: rgba(255,255,255,.78) !important;
  color: var(--cpn-text) !important;
  text-decoration: none !important;
  font: inherit !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 999px !important;
  padding: 10px 12px !important;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease !important;
}

/* Filter active state uses theme primary color */
.cpn-donations .cpn-chip.is-active{
  background: linear-gradient(135deg, var(--cpn-primary2), var(--cpn-primary)) !important;
  border-color: var(--cpn-primary) !important;
  color: var(--cpn-text) !important;
}

/* Hover / focus */
.cpn-donations .cpn-chip:hover,
.cpn-donations .cpn-share:hover{
  background: rgba(255,255,255,.92) !important;
}

.cpn-donations .cpn-chip:active,
.cpn-donations .cpn-share:active{
  transform: translateY(1px) !important;
}

.cpn-donations .cpn-chip:focus-visible,
.cpn-donations .cpn-share:focus-visible{
  box-shadow: 0 0 0 3px rgba(0,0,0,.10) !important;
}

/* Share button can look slightly "primary" on hover for clarity */
.cpn-donations .cpn-share{
  -webkit-appearance:none;
  appearance:none;
  font-size: 12px !important;
  font-weight: 950 !important;
  background: rgba(255,255,255,.70) !important;
}

.cpn-donations .cpn-share:hover{
  border-color: var(--cpn-primary) !important;
}


/* =========================================================
   Campaign excerpt + Read more (modal cards)
   - Keeps text tidy (200-word excerpt generated server-side)
   - Ensures link uses theme color variables
========================================================= */
.cpn-camp-desc .cpn-readmore{
  display:inline-block;
  margin-left:6px;
  font-weight:700;
  text-decoration:none;
  color: var(--cpn-primary);
}
.cpn-camp-desc .cpn-readmore:hover{
  text-decoration:underline;
}
.cpn-camp-desc .cpn-readmore:focus-visible{
  outline: 2px solid rgba(59,207,155,.35);
  outline-offset: 2px;
  border-radius: 10px;
}

/* =========================================================
   Single campaign page (post-like view)
   - Plugin-owned styling: does not depend on theme CSS
========================================================= */
.cpn-campaign-single-wrap{
  min-height: 100vh;
  padding: 28px 18px;
  background: var(--cpn-bg, #f6faff);
  display:flex;
  justify-content:center;
}
.cpn-campaign-single-card{
  width: min(980px, 100%);
  background: var(--cpn-card, #fff);
  border: 1px solid var(--cpn-border, #e2f7ef);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0,0,0,.10);
  padding: 22px;
}
.cpn-campaign-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:700;
  color: var(--cpn-muted, #2f6f5e);
  margin-bottom: 10px;
}
.cpn-campaign-back:hover{ color: var(--cpn-text, #06251c); }
.cpn-campaign-single-title{
  margin: 0 0 14px;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.15;
  color: var(--cpn-text, #06251c);
}
.cpn-campaign-single-media img{
  width:100%;
  height:auto;
  border-radius: 18px;
  display:block;
}
.cpn-campaign-single-meta{
  display:flex;
  flex-wrap:wrap;
  gap: 12px 18px;
  margin-top: 14px;
  color: var(--cpn-muted, #2f6f5e);
  font-size: 14px;
}
.cpn-campaign-single-bar{
  margin-top: 10px;
  height: 10px;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow:hidden;
}
.cpn-campaign-single-bar span{
  display:block;
  height:100%;
  background: var(--cpn-primary, #3bcf9b);
  border-radius: 999px;
}
.cpn-campaign-single-content{
  margin-top: 16px;
  color: var(--cpn-text, #06251c);
  font-size: 15px;
  line-height: 1.65;
}
.cpn-campaign-single-content p{ margin: 0 0 12px; }
.cpn-campaign-single-actions{
  margin-top: 16px;
  display:flex;
  justify-content:flex-end;
}
@media (max-width: 520px){
  .cpn-campaign-single-card{ padding: 18px; border-radius: 18px; }
}

/* v1.7.35 GOLD FINAL overrides */
.cpn-postview-back{border:none;background:var(--cpn-primary);color:#fff;border-radius:999px;padding:.6em 1em}
.cpn-postview-back:hover{background:var(--cpn-primary2)}
.cpn-campaign-badge{display:inline-block;padding:.3em .7em;border-radius:999px;background:var(--cpn-primary);color:#06251c}
.cpn-progress{position:relative;overflow:hidden}
.cpn-progress .cpn-progress-label{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-weight:600}


/* =========================================================
   Campaign Post View – hard overrides (plugin-owned styles)
   ========================================================= */
.cpn-donations .cpn-post-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  margin: 6px 0 14px;
}
.cpn-donations .cpn-post-actions .cpn-btn{
  min-width: 128px;
}

/* Make ghost buttons feel like the theme (avoid WP pink borders) */
.cpn-donations .cpn-btn.cpn-btn-ghost{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  color: var(--cpn-text, #0f172a);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.cpn-donations .cpn-btn.cpn-btn-ghost:hover{
  border-color: rgba(0,0,0,.16);
  transform: translateY(-1px);
}
.cpn-donations .cpn-btn.cpn-btn-ghost:active,
.cpn-donations .cpn-btn.cpn-btn-ghost.is-active{
  background: var(--cpn-theme, #3b82f6);
  border-color: var(--cpn-theme, #3b82f6);
  color:#fff;
  transform: translateY(0);
}

/* Hero image */
.cpn-donations .cpn-post-hero{
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:16px;
  overflow:hidden;
  margin: 0 0 14px;
}
.cpn-donations .cpn-post-hero img{
  width:100%;
  height:auto;
  display:block;
}

/* Stats: 50/50 on desktop, stacked on mobile */
.cpn-donations .cpn-post-stats{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin: 14px 0;
}
.cpn-donations .cpn-post-stat{
  flex: 1 1 100%;
}
@media (min-width: 720px){
  .cpn-donations .cpn-post-stat{
    flex: 1 1 calc(50% - 6px);
  }
}

/* Progress bar (works for list + post view) */
.cpn-donations .cpn-progress{
  position:relative;
  width:100%;
  height:12px;
  background: rgba(15,23,42,.10);
  border-radius:999px;
  overflow:hidden;
  margin: 0;
  padding: 0;
}
.cpn-donations .cpn-progress > span{
  display:block;
  height:100%;
  width:0;
  background: var(--cpn-theme, #3b82f6);
  border-radius:999px;
  margin:0;
  padding:0;
}
.cpn-donations .cpn-progress .cpn-progress-fill{
  position:absolute;
  inset:0 auto 0 0;
  height:100%;
  width:0;
  background: var(--cpn-theme, #3b82f6);
  border-radius:999px;
  transition: width .65s cubic-bezier(.2,.8,.2,1);
}
.cpn-donations .cpn-progress--withlabel .cpn-progress-label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:12px;
  color:#fff;
  letter-spacing:.2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
  pointer-events:none;
}

/* Share modal */
.cpn-donations .cpn-share-modal{
  padding: 6px 6px 2px;
}
.cpn-donations .cpn-share-title{
  font-weight: 800;
  font-size: 16px;
  margin: 4px 6px 10px;
}
.cpn-donations .cpn-share-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  padding: 0 6px 10px;
}
@media (min-width: 520px){
  .cpn-donations .cpn-share-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}
.cpn-donations .cpn-share-item{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  cursor:pointer;
}
.cpn-donations .cpn-share-item:hover{
  border-color: rgba(0,0,0,.16);
}
.cpn-donations .cpn-share-url{
  margin: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,23,42,.05);
  border: 1px solid rgba(15,23,42,.08);
  font-size: 12px;
  color: rgba(15,23,42,.75);
  word-break: break-all;
}

/* --- CPN Donations: Progress bar (theme-safe) --- */
.cpn-donations .cpn-progress{
  position:relative;
  overflow:hidden;
  padding:0;
}
.cpn-donations .cpn-progress-fill{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:var(--cpn-pct, 0%);
  background: var(--cpn-primary, #2f6fff);
  border-radius:inherit;
  transform:none;
  transform-origin:left center;
  transition: width .6s ease;
}
.cpn-donations .cpn-progress--pct .cpn-progress-label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  color:#ffffff;
  pointer-events:none;
}


/* --- CPN Donations: Progress bar + View more (UI polish) --- */
.cpn-donations .cpn-progress-wrap{ margin-top:8px; }
.cpn-donations .cpn-progress{
  position:relative;
  height:18px;
  border-radius:999px;
  background: rgba(15,23,42,.06);
  border: 2px solid rgba(47,111,255,.35);
  box-shadow: inset 0 2px 6px rgba(15,23,42,.12);
  overflow:hidden;
  padding:0;
}
.cpn-donations .cpn-progress-fill{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:0%;
  background: var(--cpn-primary, #2f6fff);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12);
  border-radius:inherit;
  transform:none;
  transition: width .75s ease;
}
.cpn-donations .cpn-progress--pct.is-ready .cpn-progress-fill{ width: var(--cpn-pct, 0%); }
.cpn-donations .cpn-progress.is-ready .cpn-progress-fill{ width: var(--cpn-pct, 0%); }

.cpn-donations .cpn-progress-pct{
  margin-top:10px;
  font-size:14px;
  font-weight:800;
  color: rgba(15,23,42,.85);
}

.cpn-donations .cpn-progress-label{ display:none !important; }

.cpn-donations .cpn-readmore.cpn-btn{
  margin-top:8px;
  cursor:pointer;
}


/* --- Campaign Slider / Carousel (up to 6 images) --- */
.cpn-slider{
  position: relative;
  margin: 14px 0 10px 0;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
}
.cpn-slider-viewport{ overflow:hidden; width:100%; }
.cpn-slider-track{
  display:flex;
  width:100%;
  transform: translateX(0%);
  transition: transform 420ms ease;
}
.cpn-slide{ flex: 0 0 100%; width:100%; }

/* Fade cross‑dissolve variant (clean + premium) */
.cpn-slider.cpn-slider--fade .cpn-slider-track{
  display:grid;
  width:100%;
  transform:none !important;
  transition:none !important;
}
.cpn-slider.cpn-slider--fade .cpn-slide{
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 650ms ease;
}
.cpn-slider.cpn-slider--fade .cpn-slide.is-active{ opacity: 1; }
/* Sensible default before JS init */
.cpn-slider.cpn-slider--fade .cpn-slide:first-child{ opacity: 1; }

/* Hide arrows + dots for a delicate look */
.cpn-slider.cpn-slider--fade .cpn-slider-arrow,
.cpn-slider.cpn-slider--fade .cpn-slider-dots{ display:none !important; }
.cpn-slider .cpn-post-hero{
  width:100%;
  border:0;
  padding:0;
  background:transparent;
  display:block;
}
.cpn-slider .cpn-post-hero img{
  width:100%;
  height:auto;
  display:block;
}
.cpn-slider-arrow{
  position:absolute;
  z-index: 6;
  top:50%;
  transform: translateY(-50%);
  border:0;
  width:38px;
  height:38px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color:#fff;
  font-size: 26px;
  line-height: 38px;
  text-align:center;
  cursor:pointer;
  backdrop-filter: blur(6px);
}
.cpn-slider-prev{ left: 10px; }
.cpn-slider-next{ right: 10px; }
.cpn-slider-arrow:hover{ background: rgba(0,0,0,0.60); }

.cpn-slider-dots{
  position:absolute;
  z-index: 6;
  left:0;
  right:0;
  bottom:10px;
  display:flex;
  gap:8px;
  justify-content:center;
  align-items:center;
  padding:0 12px;
}
.cpn-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  border:0;
  background: rgba(255,255,255,0.55);
  cursor:pointer;
}
.cpn-dot.is-active{
  width:18px;
  background: rgba(255,255,255,0.95);
}

/* Hard guard against horizontal overflow inside plugin UI */
.cpn-donations, .cpn-modal-backdrop, .cpn-modal-card{ overflow-x:hidden; }
.cpn-donations *{ max-width:100%; box-sizing:border-box; }


/* Slider inside campaign cards */
.cpn-slider--card{ margin:0; border-radius:16px; }
.cpn-slider--card .cpn-slider-arrow{ width:34px; height:34px; line-height:34px; font-size:24px; }
.cpn-slider--card .cpn-slider-dots{ bottom:8px; }


/* Auto QR (frontend) */
.cpn-donations .cpn-qr-auto-msg{
  font-weight:800;
  color:var(--cpn-muted);
  padding:18px;
  text-align:center;
}
.cpn-donations .cpn-qr--auto{
  display:flex;
  align-items:center;
  justify-content:center;
}
.cpn-donations .cpn-qr-img{
  width: min(320px, 100%);
  height:auto;
  border-radius:16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}
@media (max-width: 520px){
  .cpn-donations .cpn-qr-img{ width: min(256px, 100%); }
}


/* Disclaimer */
.cpn-disclaimer{
  margin: 10px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--cpn-border);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  color: var(--cpn-muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: justify;
}
.cpn-disclaimer a{ color: var(--cpn-primary); text-decoration: underline; }
