/* ─────────────────────────────────────────────────────────────────────────
   AssurePort — GDPR Consent Banner styles (Sprint 4.5)

   Bottom-right floating card, max-width 480px. Dark theme by default
   (matches the rest of the site). Light-theme fallback via
   prefers-color-scheme so future light-mode shipping does not break
   contrast. Equal-prominence buttons (CNIL dark-pattern guidance).

   z-index 9999 so it stays above sticky headers (.nav uses z-index 50)
   and modals from the app (max z-index ≈ 1000).
   ───────────────────────────────────────────────────────────────────────── */

#aprt-consent-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 480px;
  width: calc(100% - 32px);
  z-index: 9999;
  animation: aprt-consent-slide-up .2s ease-out;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.aprt-consent-card {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,.6), 0 4px 12px -2px rgba(0,0,0,.4);
}

.aprt-consent-h {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--text);
}

.aprt-consent-b {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0 0 14px;
}

.aprt-consent-b strong {
  color: var(--text);
  font-weight: 600;
}

.aprt-consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.aprt-consent-btn {
  flex: 1 1 auto;
  min-width: 140px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}

.aprt-consent-primary {
  background: var(--primary);
  color: #fff;
}
.aprt-consent-primary:hover  { background: var(--primary-hover); }
.aprt-consent-primary:focus  { outline: 2px solid var(--text); outline-offset: 2px; }

.aprt-consent-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.aprt-consent-secondary:hover { background: var(--surface); }
.aprt-consent-secondary:focus { outline: 2px solid var(--text); outline-offset: 2px; }

.aprt-consent-link {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aprt-consent-link:hover { color: var(--text); }

@keyframes aprt-consent-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Reduce motion if user opts out. */
@media (prefers-reduced-motion: reduce) {
  #aprt-consent-banner { animation: none; }
}

/* Mobile: edge-to-edge with small inset. */
@media (max-width: 480px) {
  #aprt-consent-banner {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }
  .aprt-consent-actions { flex-direction: column; }
  .aprt-consent-btn { width: 100%; }
}

/* Defensive light-theme override (the rest of the site is dark-only; this
   keeps the banner readable if a future page ships with prefers-color-scheme
   light overrides).
   NOTE: [data-theme="light"] overrides --bg, --surface, --text, --text-2,
   --muted, --border, --border-strong in design-tokens.css — so the card
   picks up light values automatically via those tokens. Only banner-specific
   structural overrides that are NOT covered by the global token cascade go here. */
@media (prefers-color-scheme: light) {
  /* Site explicitly opts in to light theme via [data-theme="light"] —
     we honour that, but default to dark to match the body. */
  [data-theme="light"] .aprt-consent-secondary:hover { background: var(--elevated); }
}
