/* DocuEstate.AI — Consent Manager (banner + preferenze) */

.dc-banner {
  position: fixed;
  bottom: 20px; left: 20px; right: 20px;
  max-width: 640px;
  z-index: 9000;
  background: rgba(10, 22, 40, 0.97);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 22px 24px;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: dc-in 0.35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes dc-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dc-banner-in { display: flex; flex-direction: column; gap: 16px; }
.dc-copy strong { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; color: #fff; }
.dc-copy p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: rgba(255, 255, 255, 0.78); }
.dc-copy a { color: #22B893; text-decoration: underline; text-underline-offset: 3px; }
.dc-copy a:hover { color: #fff; }
.dc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  flex: 1;
  min-width: 116px;
  transition: all 0.2s cubic-bezier(.2, .7, .2, 1);
}
.dc-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.dc-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }
.dc-primary { background: #1A8870; color: #fff; }
.dc-primary:hover { background: #22B893; }
.dc-btn:focus-visible { outline: 2px solid #22B893; outline-offset: 2px; }

@media (min-width: 680px) {
  .dc-banner-in { flex-direction: row; align-items: center; gap: 24px; }
  .dc-actions { flex-shrink: 0; }
  .dc-btn { flex: 0 0 auto; }
}
@media (max-width: 480px) {
  .dc-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
}

/* preferences modal */
.dc-modal {
  position: fixed; inset: 0;
  z-index: 9001;
  background: rgba(6, 14, 26, 0.66);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: dc-fade 0.25s ease both;
}
@keyframes dc-fade { from { opacity: 0; } to { opacity: 1; } }
.dc-modal-card {
  background: #0A1628;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.dc-modal-card h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; color: #fff; }
.dc-modal-intro { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin: 0 0 20px; line-height: 1.55; }
.dc-cat {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.dc-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: #fff;
}
.dc-cat p { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); line-height: 1.5; }
.dc-locked {
  font-size: 0.72rem; color: #22B893; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.dc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.dc-switch input { opacity: 0; width: 0; height: 0; }
.dc-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px; transition: background 0.2s;
}
.dc-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.dc-switch input:checked + .dc-slider { background: #1A8870; }
.dc-switch input:checked + .dc-slider::before { transform: translateX(18px); }
.dc-switch input:focus-visible + .dc-slider { outline: 2px solid #22B893; outline-offset: 2px; }
.dc-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.dc-modal-actions .dc-btn { flex: 1; }

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