/* ============================================================
   Commercial Popups  
   ============================================================ */

/* ── Backdrop ──────────────────────────────────────── */
.cr-cpop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100003;
  animation: crCpopFadeIn 0.25s ease forwards;
}

/* ── Modal card ──────────────────────────────────────────────── */
.cr-cpop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 100004;
  width: min(600px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  animation: crCpopSlideIn 0.22s ease-out forwards;
}

/* ── Close button ────────────────────────────────────────── */
.cr-cpop__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background: white;
}

.cr-cpop__close:hover,
.cr-cpop__close:focus-visible {
  cursor: pointer;
  background: white;
}

/* ── Content area ────────────────────────────────────────────── */
.cr-cpop__body {
  overflow: hidden;
  border-radius: 8px;
}

/* Prevent body scroll when a popup is open */
body.cr-cpop-open {
  overflow: hidden;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes crCpopFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes crCpopSlideIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1);    }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cr-cpop {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
  }

  .cr-cpop__close {
    top: 8px;
    right: 8px;
  }
}
