/* static/css/cookie-banner.css
 * Fixed-bottom, accessible cookie-consent banner.
 * Renders once until the user makes a choice; server-side `cookie_consent_recorded`
 * suppresses it on subsequent requests.
 */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 99997;                       /* below upgrade modal (100000) + popups (99998/9) */
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.08);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  animation: djCookieBannerIn 0.35s ease both;
}

.cookie-banner.is-hiding {
  animation: djCookieBannerOut 0.25s ease forwards;
  pointer-events: none;
}

@keyframes djCookieBannerIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes djCookieBannerOut {
  to { opacity: 0; transform: translateY(8px); }
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
}

.cookie-banner__body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-banner__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  font-size: 18px;
  margin-top: 2px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.cookie-banner__text { min-width: 0; }

.cookie-banner__title {
  margin: 0 0 4px;
  font-family: 'Poppins', 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.cookie-banner__message {
  margin: 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
}

.cookie-banner__message a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.cookie-banner__message a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.cookie-banner__btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.cookie-banner__btn--primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.cookie-banner__btn--primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.cookie-banner__btn--primary:active { transform: translateY(0); }

.cookie-banner__btn--secondary {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.cookie-banner__btn--secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.cookie-banner__btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 12px;
  }
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 14px;
  }
  .cookie-banner__buttons { width: 100%; }
  .cookie-banner__btn { flex: 1 1 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-banner.is-hiding { animation: none; }
}
