:root{
  /* Brand: white + blue */
  --cc-card:#ffffff;
  --cc-text:#0b1b3a;
  --cc-muted:rgba(11,27,58,.72);
  --cc-border:rgba(15,23,42,.14);
  --cc-shadow:0 18px 60px rgba(2,6,23,.18);
  --cc-accent:#2563eb;   /* blue */
  --cc-accent-2:#3b82f6; /* lighter blue */
  --cc-danger:#ef4444;
  --cc-radius:16px;
  --cc-gap:12px;
  --cc-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* Overlay (centered) */
.cc-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
}
.cc-overlay[aria-hidden="false"]{ display:flex; }

.cc-card{
  width: min(560px, 100%);
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  color: var(--cc-text);
  font-family: var(--cc-font);
  overflow: hidden;
}

.cc-head{ padding: 18px 18px 0 18px; }
.cc-title{ margin:0; font-size: 18px; line-height: 1.25; letter-spacing: .2px; }
.cc-desc{ margin:10px 0 0 0; color: var(--cc-muted); font-size: 14px; line-height: 1.5; }

.cc-body{ padding: 14px 18px 18px 18px; }

.cc-actions{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--cc-gap);
  margin-top: 14px;
}
@media (min-width: 520px){
  .cc-title{ font-size: 20px; }
  .cc-actions{ grid-template-columns: 1fr 1fr 1fr; }
}

/* Buttons: reset to avoid theme conflicts */
.cc-overlay button,
.cc-manage button{
  all: unset;
  box-sizing: border-box;
  font-family: var(--cc-font);
}

.cc-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 42px;

  padding: 11px 14px;
  border-radius: 12px;

  border: 1px solid var(--cc-border);
  background: rgba(37,99,235,.06);
  color: var(--cc-text);

  font-weight: 800;
  font-size: 14px;
  line-height: 1;

  cursor: pointer;
  user-select: none;

  transition: transform .08s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}
.cc-btn:hover{ background: rgba(37,99,235,.10); border-color: rgba(37,99,235,.22); }
.cc-btn:active{ transform: translateY(1px); }
.cc-btn:focus-visible{ outline: 3px solid rgba(37,99,235,.30); outline-offset: 2px; }

.cc-btn-primary{
  background: linear-gradient(180deg, var(--cc-accent-2), var(--cc-accent));
  border-color: rgba(37,99,235,.45);
  color: #ffffff;
}
.cc-btn-primary:hover{ filter: brightness(1.03); }

.cc-btn-danger{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.35);
  color: var(--cc-text);
}
.cc-btn-danger:hover{ background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.45); }

/* Preferences panel */
.cc-pref{
  margin-top: 14px;
  border-top: 1px solid var(--cc-border);
  padding-top: 14px;
  display: none;
}
.cc-pref[aria-hidden="false"]{ display:block; }

.cc-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  padding: 10px 0;
}
.cc-row + .cc-row{ border-top: 1px solid rgba(15,23,42,.08); }
.cc-row h4{ margin:0; font-size:14px; line-height:1.2; }
.cc-row p{
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--cc-muted);
  max-width: 380px;
}

/* Toggle */
.cc-toggle{ position: relative; width: 48px; height: 28px; flex: 0 0 auto; }
.cc-toggle input{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.cc-switch{
  position:absolute; inset:0;
  border-radius: 999px;
  background: rgba(15,23,42,.12);
  border: 1px solid rgba(15,23,42,.14);
  transition: background .15s ease, border-color .15s ease;
}
.cc-switch::after{
  content:"";
  position:absolute; top:50%; left:3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.95);
  box-shadow: 0 6px 14px rgba(2,6,23,.18);
  transition: left .15s ease;
}
.cc-toggle input:checked + .cc-switch{
  background: rgba(37,99,235,.22);
  border-color: rgba(37,99,235,.32);
}
.cc-toggle input:checked + .cc-switch::after{ left: 23px; }
.cc-toggle input:disabled + .cc-switch{ opacity: .65; cursor:not-allowed; }

/* Links */
.cc-links{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  color: var(--cc-muted);
  font-size: 13px;
}
.cc-links a{
  color: var(--cc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Manage button (bottom-right) */
.cc-manage{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 99998;
  display: none;
  pointer-events: auto;
}
.cc-manage[aria-hidden="false"]{ display:block; }
.cc-manage button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--cc-border);
  background: rgba(255,255,255,.92);
  color: var(--cc-accent);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(2,6,23,.10);
}

@media (prefers-reduced-motion: reduce){
  .cc-btn, .cc-switch, .cc-switch::after{ transition:none; }
}
