.cp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: none;
}
.cp-overlay.open {
  display: flex;
}

/* CARD */
.cp-card {
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: #071013;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  color: #f4f3f2;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* LOGO */
.cp-logo {
  width: 350px;
  height: auto;
  object-fit: contain;
  margin-bottom: 32px;
  border-radius: 13px;
  align-self: center; /* keeps the logo centered whatever image you drop in */
}

/* HEADER */
.cp-header h2 {
  margin: 0 0 8px;
  font-family: "Inter", sans-serif;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: #f4f3f2;
}
.cp-header p {
  margin: 0 0 20px;
  color: #9aa1ad;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

/* INTRO TEXT (above the terms box) */
.cp-terms-intro {
  margin: 0 0 16px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: #9aa1ad;
  text-align: center;
  white-space: nowrap;
}
.cp-terms-intro a {
  color: #f4f3f2;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(244, 243, 242, 0.3);
  text-underline-offset: 2px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.cp-terms-intro a:hover {
  color: #69aac1;
  text-decoration-color: currentColor;
}

/* TERMS */
.cp-terms-box {
  height: 210px;
  overflow-y: auto;
  padding: 20px;
  background: #22242c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  scrollbar-width: thin;
  scrollbar-color: #454a57 transparent;
}
.cp-terms-box::-webkit-scrollbar { width: 5px; }
.cp-terms-box::-webkit-scrollbar-track { background: transparent; }
.cp-terms-box::-webkit-scrollbar-thumb { background: #454a57; border-radius: 20px; }

.cp-terms-box h3 {
  margin: 0 0 16px;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #f4f3f2;
}
.cp-terms-box p {
  margin: 0 0 15px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
  color: #9aa1ad;
}
.cp-terms-box p:last-child { margin-bottom: 0; }

/* SCROLL MESSAGE */
.cp-scroll-note {
  padding: 10px 2px 16px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  color: #6b7280;
  transition: opacity 0.2s ease;
}
.cp-scroll-note.is-hidden {
  opacity: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
}

/* ACCEPT ROW */
.cp-toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 22px;
  cursor: pointer;
  user-select: none;
}
.cp-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* SWITCH */
.cp-switch {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #3a3f4b;
  transition: background .2s ease, box-shadow .2s ease;
}
.cp-switch-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f4f3f2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: transform .2s ease, background .2s ease;
}

.cp-checkbox:checked + .cp-switch {
  background: #69aac1;
  box-shadow: 0 0 0 3px rgba(244, 243, 242, 0.08);
}
.cp-checkbox:checked + .cp-switch .cp-switch-dot {
  transform: translateX(16px);
  background: #ffffff;
}

/* visibly locked look while the switch is disabled (before scrolling to the end) */
.cp-checkbox:disabled + .cp-switch {
  opacity: 0.5;
}
.cp-toggle-row:has(.cp-checkbox:disabled) {
  cursor: not-allowed;
}

.cp-toggle-label {
  color: #9aa1ad;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
.cp-toggle-label span {
  color: #f4f3f2;
  font-weight: 500;
}

/* BUTTONS */
.cp-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}
.cp-actions button {
  height: 46px;
  border: 0;
  border-radius: 13px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
}
.cp-actions button:hover { transform: translateY(-1px); }

.cp-decline { color: #c7cdd9; background: #2a2d36; }
.cp-decline:hover { background: #343841; }

.cp-continue { color: #ffffff; background: #69aac1; }
.cp-continue:hover { background: #69aac1; }

/* dimmed/locked look for Continue until the switch is on */
.cp-continue:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.cp-continue:disabled:hover {
  transform: none;
  background: #69aac1;
}

/* MOBILE */
@media (max-width: 600px) {
  .cp-overlay { align-items: flex-end; padding: 10px; }
  .cp-card { width: 100%; max-height: calc(100vh - 20px); padding: 22px; border-radius: 22px; }
  .cp-logo { width: 250px; height: auto; margin-bottom: 16px; }
  .cp-header h2 { font-size: 19px; }
  .cp-terms-intro { font-size: 12.5px; margin-bottom: 14px; white-space: normal; }
  .cp-terms-box { height: 200px; padding: 17px; }
  .cp-terms-box p { font-size: 12.5px; }
  .cp-actions button { height: 44px; }
}
