/* ═══════════════════════════════════════════════
   COOKIE CONSENT BANNER — LGPD-compliant
   Appears on bottom of the screen, above all content.
   Works on both arena and landing layouts.
   ═══════════════════════════════════════════════ */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
}

.cookie-consent-banner[hidden] {
  display: none !important;
}

.cookie-consent-banner {
  pointer-events: auto;
  background: var(--bg-card, #F8FAF9);
  border-top: 1px solid var(--border, #E2E8E4);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  padding: 1.25rem 1.5rem;
  animation: cookie-consent-slide-up 0.25s ease-out;
}

@keyframes cookie-consent-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-consent-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.cookie-consent-copy {
  flex: 1 1 320px;
  min-width: 280px;
}

.cookie-consent-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #1A2A1E);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.cookie-consent-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #4A5D50);
  margin: 0;
}

.cookie-consent-link {
  color: var(--green-primary, #2D6A4F);
  text-decoration: underline;
}

.cookie-consent-link:hover {
  color: var(--text-primary, #1A2A1E);
}

/* ── DETAILS PANEL ── */

.cookie-consent-details {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border, #E2E8E4);
  margin-top: 0.25rem;
}

.cookie-consent-details[hidden] {
  display: none !important;
}

.cookie-consent-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
  padding: 0.4rem 0;
}

.cookie-consent-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-primary, #2D6A4F);
  cursor: pointer;
}

.cookie-consent-option input[type="checkbox"][disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-consent-option-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1A2A1E);
  line-height: 1.3;
}

.cookie-consent-option-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #8A9B8F);
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* ── ACTIONS ── */

.cookie-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 0 0 auto;
}

.cookie-consent-btn {
  appearance: none;
  border: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cookie-consent-btn-ghost {
  background: transparent;
  border: 1px solid var(--border, #E2E8E4);
  color: var(--text-secondary, #4A5D50);
}

.cookie-consent-btn-ghost:hover {
  border-color: var(--text-secondary, #4A5D50);
  color: var(--text-primary, #1A2A1E);
}

.cookie-consent-btn-primary {
  background: var(--green-primary, #2D6A4F);
  color: #fff;
  border: 1px solid var(--green-primary, #2D6A4F);
}

.cookie-consent-btn-primary:hover {
  background: var(--text-primary, #1A2A1E);
  border-color: var(--text-primary, #1A2A1E);
}

/* ── DARK THEME OVERRIDES ──
   We rely on the CSS variable cascade from arena.css / landing.css to
   resolve --green-primary, --bg-card, --text-* correctly per theme.
   No hard-coded colors here. */

[data-theme="dark"] .cookie-consent-btn-primary:hover {
  background: var(--green-mid, #40916C);
  border-color: var(--green-mid, #40916C);
}

/* ── POST-REJECTION TOAST ── */

.cookie-consent-toast[hidden] {
  display: none !important;
}

.cookie-consent-toast {
  pointer-events: auto;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 460px;
  margin: 0 auto;
  background: #0a1a10;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: cookie-consent-toast-in 0.25s ease-out;
}

@keyframes cookie-consent-toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-toast-inner {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.cookie-consent-toast-icon {
  flex-shrink: 0;
  color: #6BBF8A;
}

.cookie-consent-toast-text {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #fff;
}

.cookie-consent-toast-link {
  color: #6BBF8A;
  font-weight: 600;
  text-decoration: underline;
}

.cookie-consent-toast-link:hover {
  color: #A7D5B8;
}

.cookie-consent-toast-close {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

.cookie-consent-toast-close:hover {
  color: #fff;
}

/* ── RESPONSIVE ── */

@media (max-width: 720px) {
  .cookie-consent-banner {
    padding: 1rem;
  }

  .cookie-consent-inner {
    flex-direction: column;
    gap: 0.85rem;
  }

  .cookie-consent-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .cookie-consent-btn {
    flex: 1 1 auto;
  }

  .cookie-consent-toast {
    bottom: 0.75rem;
  }
}
