:root {
  --cc-bg: #111827;
  --cc-txt: #f9fafb;
  --cc-sub: #9ca3af;
  --cc-accent: #60a5fa;
  --cc-btn: #1f2937;
  --cc-btn-txt: #f9fafb;
  --cc-ok: #22c55e;
  --cc-no: #ef4444;
  --shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

.cc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: saturate(120%) blur(2px);
  z-index: 9998;
}

.cc-dialog {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);

  width: min(380px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;

  background: var(--cc-bg);
  color: var(--cc-txt);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  z-index: 9999;

  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.cc-hidden {
  display: none !important;
}

.cc-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.cc-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--cc-txt);
}

.cc-body {
  font-size: 13px;
  color: var(--cc-sub);
  line-height: 1.35;
}

.cc-small {
  font-size: 11px;
  color: var(--cc-sub);
  margin: 0 0 3px;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  background: var(--cc-btn);
  color: var(--cc-btn-txt);
}

.cc-accept {
  background: var(--cc-ok);
  color: #06280f;
}

.cc-reject {
  background: var(--cc-no);
  color: #fff;
}

.cc-customize {
  border-color: #374151;
  background: #0b1220;
}

details.cc-cats {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  color: var(--cc-txt);
  font-size: 13px;
}

details.cc-cats summary {
  cursor: pointer;
  font-weight: 600;
}

.cc-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid #1f2937;
  color: var(--cc-txt);
  font-size: 13px;
}

.cc-switch:first-of-type {
  border-top: none;
  margin-top: 6px;
}

.cc-switch input[type="checkbox"] {
  width: 34px;
  min-width: 34px;
  height: 18px;
  -webkit-appearance: none;
  appearance: none;
  background: #374151;
  border-radius: 999px;
  position: relative;
  outline: none;
  cursor: pointer;
}

.cc-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left .2s;
}

.cc-switch input[type="checkbox"]:checked {
  background: var(--cc-accent);
}

.cc-switch input[type="checkbox"]:checked::after {
  left: 18px;
}

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

.cc-manage {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9997;
  background: #0b1220;
  border: 1px solid #1f2937;
  display: none;
}

.cc-manage.active {
  display: inline-block;
}

@media (max-width: 600px) {
  .cc-dialog {
    width: calc(100vw - 24px);
    max-height: 62vh;
    bottom: 12px;
    padding: 12px;
  }

  .cc-actions {
    flex-direction: column;
  }

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