:root {
  --cc-bg: #0b0f19;
  --cc-surface: #ffffff;
  --cc-muted: #6b7280;
  --cc-text: #0f172a;
  --cc-border: #e5e7eb;
  --cc-primary: #111827;
  --cc-primary-hover: #000000;
}

.cc-root {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1100;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.cc-banner {
  width: min(1040px, calc(100vw - 24px));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--cc-border);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.cc-banner[hidden] {
  display: none;
}

.cc-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cc-text);
}

.cc-text {
  margin: 0;
  color: #374151;
  line-height: 1.5;
  font-size: 0.92rem;
}

.cc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--cc-muted);
}

.cc-link {
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-link-btn {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 2px;
  font: inherit;
  cursor: pointer;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-btn {
  min-height: 44px;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.cc-btn-primary {
  background: var(--cc-primary);
  color: #fff;
}

.cc-btn-primary:hover {
  background: var(--cc-primary-hover);
}

.cc-btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border-color: #e5e7eb;
}

.cc-btn-ghost {
  background: #fff;
  color: #111827;
  border-color: #d1d5db;
}

.cc-manage {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1090;
  pointer-events: auto;
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  cursor: pointer;
}

.cc-manage[hidden] {
  display: none;
}

.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cc-modal-backdrop[hidden] {
  display: none;
}

.cc-modal {
  width: min(720px, 100%);
  max-height: min(85vh, 880px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
  padding: 24px;
}

.cc-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.cc-close {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.cc-groups {
  display: grid;
  gap: 14px;
}

.cc-group {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.cc-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cc-group-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.cc-group-body {
  margin: 6px 0 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
}

.cc-switch {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-block;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #d1d5db;
  transition: all 0.2s ease;
  border-radius: 9999px;
}

.cc-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 9999px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-slider {
  background: #111827;
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
  background: #111827;
  opacity: 0.65;
  cursor: not-allowed;
}

.cc-modal-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  font-size: 0.72rem;
  color: #4b5563;
  background: #f9fafb;
}

body.cc-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .cc-actions {
    flex-direction: column;
  }

  .cc-actions .cc-btn {
    width: 100%;
  }

  .cc-modal {
    padding: 18px;
    border-radius: 16px;
  }

  .cc-manage {
    right: 12px;
    bottom: 12px;
  }
}
