/* GDPR consent banner — fixed bottom, dark Vault Blueprint look.
   Scoped under .cc-consent so the React app's CSS can't bleed in. */

.cc-consent,
.cc-consent * {
  box-sizing: border-box;
}

.cc-consent {
  --cc-bg:        #0a0c10;
  --cc-bg-card:   #161a22;
  --cc-border:    #242935;
  --cc-border-hl: #3a4255;
  --cc-text-hi:   #f0f4f8;
  --cc-text-mid:  #8a93a6;
  --cc-text-lo:   #4f5668;
  --cc-accent:    #06b6d4;
  --cc-glow:      rgba(6, 182, 212, 0.4);
  --cc-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --cc-sans:      'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  position: fixed;
  inset: auto 0 0 0;
  z-index: 2147483640;
  font-family: var(--cc-sans);
  -webkit-font-smoothing: antialiased;
}

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

.cc-banner {
  margin: 0 auto;
  max-width: 1100px;
  padding: 16px 20px;
  background: rgba(15, 18, 24, 0.98);
  border-top: 1px solid var(--cc-border-hl);
  border-left: 1px solid var(--cc-border);
  border-right: 1px solid var(--cc-border);
  border-radius: 8px 8px 0 0;
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(6, 182, 212, 0.06);
  backdrop-filter: blur(8px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 20px;
  align-items: center;
  color: var(--cc-text-hi);
  animation: cc-slide-up 240ms ease-out;
}

@keyframes cc-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner { animation: none; }
}

.cc-banner-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cc-text-hi);
  min-width: 0;
}

.cc-banner-text strong {
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cc-accent);
  display: inline-block;
  margin-right: 8px;
  font-weight: 500;
}

.cc-banner-text a {
  color: var(--cc-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(6, 182, 212, 0.4);
}
.cc-banner-text a:hover { color: #67e8f9; }

.cc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cc-btn {
  font-family: var(--cc-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  background: transparent;
  color: var(--cc-text-hi);
  border: 1px solid var(--cc-border-hl);
  white-space: nowrap;
}

.cc-btn:hover { border-color: var(--cc-accent); color: var(--cc-accent); }
.cc-btn:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.cc-btn-primary {
  background: var(--cc-accent);
  color: #001016;
  border-color: var(--cc-accent);
  box-shadow: 0 0 18px var(--cc-glow);
}
.cc-btn-primary:hover {
  background: #67e8f9;
  color: #001016;
  border-color: #67e8f9;
}

.cc-btn-ghost {
  color: var(--cc-text-mid);
  border-color: transparent;
}
.cc-btn-ghost:hover {
  color: var(--cc-text-hi);
  border-color: var(--cc-border-hl);
}

@media (max-width: 760px) {
  .cc-banner {
    grid-template-columns: 1fr;
    padding: 14px 16px 16px;
    border-radius: 0;
  }
  .cc-banner-actions { justify-content: stretch; }
  .cc-btn { flex: 1 1 0; text-align: center; }
}

/* ─── Manage modal ─────────────────────────────────────────────── */

.cc-modal-backdrop {
  position: fixed; inset: 0;
  z-index: 2147483641;
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cc-fade 160ms ease-out;
}

@keyframes cc-fade {
  from { opacity: 0; } to { opacity: 1; }
}

.cc-modal {
  background: var(--cc-bg);
  border: 1px solid var(--cc-border-hl);
  border-radius: 10px;
  max-width: 540px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px 28px 22px;
  color: var(--cc-text-hi);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(6, 182, 212, 0.08);
}

.cc-modal h2 {
  font-family: var(--cc-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cc-accent);
  margin: 0 0 14px;
  font-weight: 500;
}

.cc-modal h3 {
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--cc-text-hi);
}

.cc-modal p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cc-text-mid);
  margin: 0 0 14px;
}

.cc-purpose {
  border: 1px solid var(--cc-border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cc-purpose-meta { flex: 1 1 auto; min-width: 0; }
.cc-purpose-meta p { margin: 4px 0 0; font-size: 12.5px; }

.cc-toggle {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--cc-border);
  border-radius: 22px;
  cursor: pointer;
  transition: background-color 140ms ease;
  border: none;
  padding: 0;
}
.cc-toggle::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--cc-text-mid);
  border-radius: 50%;
  transition: transform 140ms ease, background-color 140ms ease;
}
.cc-toggle[aria-checked="true"] { background: var(--cc-accent); }
.cc-toggle[aria-checked="true"]::before {
  transform: translateX(18px);
  background: #001016;
}
.cc-toggle:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 3px;
}
.cc-toggle[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

@media (max-width: 540px) {
  .cc-modal { padding: 22px 18px 18px; }
  .cc-modal-actions .cc-btn { flex: 1 1 0; text-align: center; }
}
