:root {
  --ccn-push-brand: #A078FA;
  --ccn-push-brand-strong: #8B5CF6;
  --ccn-push-ink: #1f1733;
  --ccn-push-muted: #655a7d;
  --ccn-push-line: rgba(160, 120, 250, .20);
  --ccn-push-soft: rgba(160, 120, 250, .10);
}

.ccn-push-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.ccn-push-modal-open .ccn-push-modal-backdrop {
  display: flex;
}

.ccn-push-modal-card {
  width: min(540px, 100%);
  padding: 1.55rem;
  border-radius: 30px;
  border: 1px solid var(--ccn-push-line);
  background:
    radial-gradient(circle at top right, rgba(160, 120, 250, .18), transparent 38%),
    linear-gradient(180deg, #fff, #fbf8ff);
  box-shadow: 0 30px 80px rgba(39, 23, 72, .26);
  color: var(--ccn-push-ink);
  text-align: center;
}

.ccn-push-modal-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: .7rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(160, 120, 250, .18), rgba(255, 209, 102, .16));
  box-shadow: 0 14px 28px rgba(160, 120, 250, .18);
  overflow: hidden;
}

.ccn-push-modal-icon img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: block;
}

.ccn-push-modal-kicker {
  margin: 0 0 .35rem;
  color: var(--ccn-push-brand-strong);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ccn-push-modal-card h2 {
  margin: 0;
  color: var(--ccn-push-ink);
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.04;
  font-weight: 900;
}

.ccn-push-modal-copy,
.ccn-push-modal-note {
  margin: .75rem auto 0;
  max-width: 34rem;
  color: var(--ccn-push-muted);
  line-height: 1.55;
}

.ccn-push-modal-note {
  font-size: .92rem;
}

.ccn-push-modal-note a {
  color: #6d28d9;
  font-weight: 900;
  text-decoration: none;
}

.ccn-push-modal-actions,
.ccn-push-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  margin-top: 1rem;
}

.ccn-push-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .68rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.ccn-push-btn:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.ccn-push-btn--primary {
  background: linear-gradient(135deg, var(--ccn-push-brand), var(--ccn-push-brand-strong));
  color: #fff;
  box-shadow: 0 14px 28px rgba(160, 120, 250, .24);
}

.ccn-push-btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(160, 120, 250, .30);
}

.ccn-push-btn--ghost {
  background: #fff;
  color: #33264c;
  border-color: rgba(160, 120, 250, .24);
}

.ccn-push-btn--ghost:hover {
  color: #33264c;
  border-color: rgba(160, 120, 250, .42);
  transform: translateY(-1px);
}

.ccn-push-btn--link {
  background: transparent;
  color: #6b6478;
  padding-inline: .45rem;
}

.ccn-push-status {
  margin: .8rem 0 0;
  min-height: 1.3rem;
  color: #6b6478;
  font-weight: 750;
  line-height: 1.4;
}

.ccn-push-status[data-push-status-kind="success"] { color: #15803d; }
.ccn-push-status[data-push-status-kind="error"] { color: #b91c1c; }

.ccn-push-settings-card {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 26px;
  border: 1px solid var(--ccn-push-line);
  background:
    radial-gradient(circle at top right, rgba(160, 120, 250, .12), transparent 36%),
    #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .05);
}

.ccn-push-settings-card > details > summary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  cursor: pointer;
  color: #5b21b6;
  font-size: 1.15rem;
  font-weight: 900;
  list-style: none;
}

.ccn-push-settings-card > details > summary::-webkit-details-marker {
  display: none;
}

.ccn-push-settings-card > details > summary::before {
  content: "▸";
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  color: #6d28d9;
  font-size: .72rem;
  line-height: 1;
}

.ccn-push-settings-card > details[open] > summary::before {
  content: "▾";
}

.ccn-push-settings-body {
  display: grid;
  gap: 1rem;
  margin-top: .95rem;
}

.ccn-push-attention {
  display: grid;
  gap: .25rem;
  padding: .85rem .95rem;
  border: 1px solid rgba(160, 120, 250, .22);
  border-left: 4px solid var(--ccn-push-brand-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 248, 255, .96), rgba(255, 255, 255, .98));
  color: var(--ccn-push-ink);
}

.ccn-push-attention strong {
  font-size: .95rem;
  font-weight: 900;
}

.ccn-push-attention span {
  color: var(--ccn-push-muted);
  line-height: 1.45;
}

.ccn-push-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ccn-push-settings-head h2 {
  margin: 0;
  color: #191229;
  font-size: 1.35rem;
  font-weight: 900;
}

.ccn-push-settings-head p,
.ccn-push-device-state,
.ccn-push-settings-muted {
  margin: .25rem 0 0;
  color: #64748b;
  line-height: 1.5;
}

.ccn-push-device-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: .35rem .72rem;
  border-radius: 999px;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
}

.ccn-push-preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .6rem .85rem;
}

.ccn-push-check {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  min-width: 0;
  padding: .72rem .78rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(248, 250, 252, .78);
  color: #334155;
  font-weight: 800;
  line-height: 1.35;
}

.ccn-push-check input {
  margin-top: .15rem;
  accent-color: var(--ccn-push-brand);
}

@media (min-width: 992px) {
  .ccn-push-preferences-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ccn-push-modal-backdrop {
    align-items: flex-end;
    padding: .75rem;
  }

  .ccn-push-modal-card {
    padding: 1.15rem;
    border-radius: 24px;
  }

  .ccn-push-modal-actions,
  .ccn-push-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ccn-push-btn {
    width: 100%;
  }

  .ccn-push-settings-head {
    display: grid;
  }

  .ccn-push-preferences-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }

  .ccn-push-check {
    padding: .6rem .62rem;
    border-radius: 16px;
    font-size: .88rem;
  }
}
