:root {
  --cdcm-navy: #08122f;
  --cdcm-navy-2: #142b63;
  --cdcm-purple: #7c3aed;
  --cdcm-purple-dark: #5b21b6;
  --cdcm-lilac: #c4b5fd;
  --cdcm-text: #0b1437;
  --cdcm-muted: #5b6780;
  --cdcm-line: #dce4ef;
  --cdcm-bg: #f6f8fc;
  --cdcm-white: #ffffff;
}

.cdcm-lock { overflow: hidden; }
.cdcm-root, .cdcm-root * { box-sizing: border-box; }
.cdcm-root { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--cdcm-text); }
.cdcm-root [hidden] { display: none !important; }

.cdcm-banner {
  position: fixed;
  z-index: 2147483000;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(196, 181, 253, .35);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--cdcm-navy) 0%, var(--cdcm-navy-2) 62%, #37206f 100%);
  color: var(--cdcm-white);
  box-shadow: 0 30px 90px -30px rgba(2, 8, 23, .85);
}

.cdcm-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cdcm-lilac);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.cdcm-banner h2, .cdcm-modal h2 {
  margin: 0 0 9px;
  color: inherit;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 850;
}

.cdcm-banner p {
  max-width: 760px;
  margin: 0 0 8px;
  color: #dce7ff;
  font-size: 14px;
  line-height: 1.6;
}

.cdcm-banner a { color: #fff; font-size: 13px; text-underline-offset: 3px; }
.cdcm-banner__actions, .cdcm-modal__footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.cdcm-button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cdcm-button:hover { transform: translateY(-2px); }
.cdcm-button:focus-visible, .cdcm-close:focus-visible, .cdcm-settings-button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.cdcm-button--primary { background: linear-gradient(135deg, var(--cdcm-purple), #9333ea); color: #fff; box-shadow: 0 14px 28px -14px rgba(124, 58, 237, .95); }
.cdcm-button--secondary { background: #fff; color: var(--cdcm-purple-dark); }
.cdcm-button--ghost { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .07); color: #fff; }
.cdcm-modal .cdcm-button--ghost { border-color: #cfd8e6; background: #fff; color: #334155; }

.cdcm-backdrop { position: fixed; z-index: 2147483001; inset: 0; background: rgba(4, 10, 30, .72); backdrop-filter: blur(4px); }
.cdcm-modal {
  position: fixed;
  z-index: 2147483002;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--cdcm-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 120px -35px rgba(2, 8, 23, .85);
}
.cdcm-modal__header { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; }
.cdcm-modal__header p { margin: 0; color: var(--cdcm-muted); font-size: 14px; line-height: 1.6; }
.cdcm-modal h2 { color: var(--cdcm-text); font-size: 28px; }
.cdcm-close { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid var(--cdcm-line); border-radius: 12px; background: var(--cdcm-bg); color: var(--cdcm-text); font-size: 24px; line-height: 1; cursor: pointer; }

.cdcm-categories { display: grid; gap: 10px; margin: 24px 0; }
.cdcm-category { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 17px; border: 1px solid var(--cdcm-line); border-radius: 15px; background: #fff; }
.cdcm-category__copy strong { display: block; margin-bottom: 4px; color: var(--cdcm-text); font-size: 15px; }
.cdcm-category__copy span { display: block; color: var(--cdcm-muted); font-size: 13px; line-height: 1.5; }
.cdcm-required { padding: 6px 9px; border-radius: 999px; background: #ecfdf5; color: #087a45; font-size: 10px; font-weight: 900; white-space: nowrap; }

.cdcm-switch { position: relative; display: inline-flex; width: 48px; height: 27px; }
.cdcm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cdcm-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .18s ease; }
.cdcm-switch span::after { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 3px 9px rgba(15, 23, 42, .25); transition: transform .18s ease; }
.cdcm-switch input:checked + span { background: var(--cdcm-purple); }
.cdcm-switch input:checked + span::after { transform: translateX(21px); }
.cdcm-switch input:focus-visible + span { outline: 3px solid #93c5fd; outline-offset: 3px; }

.cdcm-declaration { margin: 0 0 24px; border: 1px solid var(--cdcm-line); border-radius: 15px; overflow: hidden; }
.cdcm-declaration summary { cursor: pointer; padding: 15px 17px; background: var(--cdcm-bg); color: var(--cdcm-text); font-size: 14px; font-weight: 800; }
.cdcm-table-wrap { overflow-x: auto; }
.cdcm-declaration table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cdcm-declaration th, .cdcm-declaration td { padding: 10px 12px; border-top: 1px solid var(--cdcm-line); text-align: left; vertical-align: top; }
.cdcm-declaration th { color: var(--cdcm-text); background: #fbfcfe; }
.cdcm-declaration td { color: var(--cdcm-muted); }

.cdcm-modal__footer { padding-top: 20px; border-top: 1px solid var(--cdcm-line); }
.cdcm-settings-button {
  position: fixed;
  z-index: 2147482999;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(196, 181, 253, .38);
  border-radius: 999px;
  background: var(--cdcm-navy);
  color: #fff;
  box-shadow: 0 14px 32px -18px rgba(2, 8, 23, .9);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.cdcm-inline-settings-button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 820px) {
  .cdcm-banner { grid-template-columns: 1fr; gap: 18px; }
  .cdcm-banner__actions { justify-content: stretch; }
  .cdcm-banner__actions .cdcm-button { flex: 1 1 150px; }
}

@media (max-width: 560px) {
  .cdcm-banner { left: 12px; right: 12px; bottom: 12px; padding: 20px; border-radius: 18px; }
  .cdcm-banner h2 { font-size: 22px; }
  .cdcm-banner__actions { display: grid; grid-template-columns: 1fr; }
  .cdcm-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 21px 17px; border-radius: 19px; }
  .cdcm-modal h2 { font-size: 24px; }
  .cdcm-category { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .cdcm-modal__footer { display: grid; grid-template-columns: 1fr; }
  .cdcm-settings-button span:last-child { display: none; }
  .cdcm-settings-button { width: 42px; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cdcm-button, .cdcm-switch span, .cdcm-switch span::after { transition: none !important; }
}
