.cp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.20);
  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: #f7f6f3;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  color: #12151C;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18), 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* LOGO */
.cp-logo {
  width: 250px;
  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: #12151C;
}
.cp-header p {
  margin: 0 0 20px;
  color: #6b7280;
  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: 13px;
  line-height: 1.6;
  color: #6b7280;
  text-align: center;
}
.cp-terms-intro a {
  color: #12151C;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(18, 21, 28, 0.3);
  text-underline-offset: 2px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.cp-terms-intro a:hover {
  color: #e76f51;
  text-decoration-color: currentColor;
}

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

.cp-terms-box h3 {
  margin: 0 0 16px;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #12151C;
}
.cp-terms-box p {
  margin: 0 0 15px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
  color: #6b7280;
}
.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: #9098a3;
  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-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: #dfe2e7;
  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: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform .2s ease, background .2s ease;
}

.cp-checkbox:checked + .cp-switch {
  background: #e76f51;
  box-shadow: 0 0 0 3px rgba(18, 21, 28, 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: #6b7280;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
.cp-toggle-label span {
  color: #12151C;
  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: #4b5563; background: #f1f2f4; }
.cp-decline:hover { background: #e7e9ec; }

.cp-continue { color: #ffffff; background: #e76f51; }
.cp-continue:hover { background: #262b35; }

/* 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: #12151C;
}

/* 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: 200px; height: auto; margin-bottom: 16px; }
  .cp-header h2 { font-size: 19px; }
  .cp-terms-intro { font-size: 12.5px; margin-bottom: 14px; }
  .cp-terms-box { height: 200px; padding: 17px; }
  .cp-terms-box p { font-size: 12.5px; }
  .cp-actions button { height: 44px; }
}
