
html.cc-locked, html.cc-locked body { overflow: hidden; }

#cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
  padding: 0;
}
#cc-overlay.is-open { pointer-events: auto; }

#cc-overlay .cc-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 28, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
#cc-overlay.is-open .cc-overlay-backdrop { opacity: 1; }

#cc-overlay .cc-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 2rem);
  margin: 1rem;
  background: #ffffff;
  border: 1px solid rgba(13, 13, 42, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(13, 13, 42, 0.25);
  color: #0d0d2a;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
  overflow: hidden;
}
#cc-overlay.is-open .cc-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.cc-card-inner {
  padding: 1.75rem 1.5rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 2rem);
}

.cc-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.cc-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(66, 187, 230, 0.12);
  color: #2A9AC4;
  font-size: 1.2rem;
}
.cc-card-heading {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0d0d2a;
  line-height: 1.25;
}
.cc-card-intro {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3d3d60;
}
.cc-card-intro a { color: #2A9AC4; }
.cc-card-intro a:hover { text-decoration: underline; }

.cc-options-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f2f5fa;
  border: 1px solid rgba(13, 13, 42, 0.06);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0d0d2a;
  transition: background-color 0.15s ease;
}
.cc-options-toggle:hover { background: #e8edf5; }
.cc-options-icon {
  font-size: 0.7rem;
  color: #3d3d60;
  transition: transform 0.18s ease;
}

.cc-options {
  margin-bottom: 1.25rem;
}
.cc-cat {
  border: 1px solid rgba(13, 13, 42, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
  background: #ffffff;
}
.cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.cc-cat-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0d0d2a;
}
.cc-cat-required {
  font-size: 0.72rem;
  color: #3d3d60;
  background: #f2f5fa;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
}
.cc-cat-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #3d3d60;
}

.cc-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.cc-switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.cc-switch-track {
  display: inline-block;
  width: 42px;
  height: 24px;
  background: #d0d5e8;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.cc-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease;
}
.cc-switch input:checked + .cc-switch-track {
  background: #42BBE6;
}
.cc-switch input:checked + .cc-switch-track::after {
  transform: translateX(18px);
}
.cc-switch input:focus-visible + .cc-switch-track {
  box-shadow: 0 0 0 3px rgba(66, 187, 230, 0.35);
}

.cc-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
}
.cc-btn {
  width: 100%;
  border: 1px solid rgba(13, 13, 42, 0.12);
  background: #ffffff;
  color: #0d0d2a;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.cc-btn:hover  { border-color: rgba(13, 13, 42, 0.3); }
.cc-btn:active { transform: scale(0.985); }

.cc-btn-primary {
  background: #42BBE6;
  border-color: #42BBE6;
  color: #061018;
}
.cc-btn-primary:hover { background: #6bcaee; border-color: #6bcaee; }

.cc-btn-ghost {
  background: transparent;
  border-color: #2A9AC4;
  color: #2A9AC4;
}
.cc-btn-ghost:hover {
  background: rgba(66, 187, 230, 0.08);
  border-color: #2A9AC4;
  color: #2A9AC4;
}

@media (min-width: 600px) {
  .cc-card-inner { padding: 2rem; }
  .cc-card-head  { gap: 1rem; margin-bottom: 1rem; }
  .cc-icon       { width: 48px; height: 48px; font-size: 1.3rem; }
  .cc-card-heading { font-size: 1.35rem; }
  .cc-card-intro { font-size: 0.95rem; }
  .cc-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .cc-actions .cc-btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.8rem 1.1rem;
  }
  .cc-actions .cc-btn-primary { order: 3; }
  .cc-actions .cc-btn-ghost   { order: 2; }
  .cc-actions [data-cc="reject"] { order: 1; }
}

@media (max-width: 380px) {
  .cc-card-inner   { padding: 1.25rem 1rem 1rem; }
  .cc-card-heading { font-size: 1.05rem; }
  .cc-card-intro   { font-size: 0.85rem; }
  .cc-icon         { width: 38px; height: 38px; font-size: 1rem; border-radius: 12px; }
  .cc-btn          { padding: 0.75rem 0.85rem; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  #cc-overlay .cc-card,
  #cc-overlay .cc-overlay-backdrop,
  .cc-switch-track,
  .cc-switch-track::after,
  .cc-options-icon { transition: none; }
}
