/*
 * DateNWed cookie consent banner (frontend/js/consent-banner.js).
 *
 * A fixed panel at the bottom of the viewport: it overlays the page instead of pushing it, so
 * showing or hiding it moves no content (no layout shift), and it wraps to a column at phone
 * width. Colours come from the page's theme tokens (landing.css / base.css), with fallbacks, so it
 * follows dark (the default) and light alike. rem only; 2.75rem targets; visible focus; Accept and
 * Decline carry equal weight.
 */
.dnw-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  padding: 0 1rem 1rem;
  pointer-events: none;
}
.dnw-consent[hidden] { display: none; }

.dnw-consent-inner {
  pointer-events: auto;
  box-sizing: border-box;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.125rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  border: 0.0625rem solid var(--line-strong, var(--line, #8d7b9e));
  border-radius: 1rem;
  background: var(--ink-1, #1b1424);
  color: var(--text-hi, #f6f1f9);
  box-shadow: 0 1rem 2.5rem -1rem rgba(0, 0, 0, 0.6);
  font-family: var(--font-body, ui-sans-serif, system-ui, sans-serif);
}

.dnw-consent-text,
.dnw-consent-current {
  flex: 1 1 18rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-mid, #d0c4db);
}
.dnw-consent-current { flex-basis: 100%; order: 2; font-size: 0.85rem; color: var(--text-low, #a898b8); }
.dnw-consent-current[hidden] { display: none; }

.dnw-consent-link {
  display: inline-block;
  padding: 0.125rem 0;
  color: var(--brand-ink, #c5a4cf);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.dnw-consent-link:hover { color: var(--brand-ink-hover, #cdb1d6); }

.dnw-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
  order: 3;
}

.dnw-consent-btn {
  min-height: 2.75rem;
  min-width: 6.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999rem;
  border: 0.0625rem solid var(--brand-strong, #ab7ab9);
  background: var(--brand-tint, transparent);
  color: var(--text-hi, #f6f1f9);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.dnw-consent-btn:hover { background: color-mix(in srgb, var(--color-primary, #9050a3) 28%, transparent); }

.dnw-consent-link:focus-visible,
.dnw-consent-btn:focus-visible {
  outline: 0.1875rem solid var(--focus, #ab7ab9);
  outline-offset: 0.125rem;
}

/* Light theme: a light panel, dark text (the tokens already flip on pages that define them). */
:root[data-theme="light"] .dnw-consent-inner {
  background: var(--ink-1, #ffffff);
  color: var(--text-hi, #1d1424);
  box-shadow: 0 1rem 2.5rem -1.25rem rgba(43, 26, 61, 0.35);
}
/* The fallbacks above are the dark theme's. A page that does not define the site's tokens (the
   tools-served /help and /investors) would keep light text on this light panel, so give every text
   colour a light-theme fallback too. Pages that define the tokens are unchanged. */
:root[data-theme="light"] .dnw-consent-text { color: var(--text-mid, #3d2f4a); }
:root[data-theme="light"] .dnw-consent-current { color: var(--text-low, #5c4b6b); }
:root[data-theme="light"] .dnw-consent-link { color: var(--brand-ink, #6e3a80); }
:root[data-theme="light"] .dnw-consent-link:hover { color: var(--brand-ink-hover, #5a2d69); }
:root[data-theme="light"] .dnw-consent-btn { color: var(--text-hi, #1d1424); }

/* Phone width: text above, the two buttons side by side and full width below. */
@media (max-width: 30rem) {
  .dnw-consent { padding: 0 0.5rem 0.5rem; }
  .dnw-consent-actions { flex: 1 1 100%; }
  .dnw-consent-btn { flex: 1 1 0; min-width: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .dnw-consent-btn { transition: background-color 0.15s ease; }
}

/* /dashboard (the SHARED_DASHBOARD shell, app.consent_banner_pages): the footer with the "Cookie
   settings" link is the last row of the shell's full-height column, styled from the shell's own
   tokens so it follows its light and dark themes. The shell's column is 100vh, which on a phone
   reaches behind the browser's toolbar and would hide that row; 100dvh is the visible height. */
.dnw-dashboard-footer {
  flex-shrink: 0;
  border-top: 0.0625rem solid var(--dash-border, rgba(141, 123, 158, 0.35));
  background: var(--dash-bg-secondary, transparent);
  font-size: 0.875rem;
}
.dnw-dashboard-footer .foot-links {
  display: flex;
  justify-content: center;
}
.dnw-dashboard-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  color: var(--dash-text-secondary, inherit);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.dnw-dashboard-footer a:hover { color: var(--dash-text-primary, inherit); }
.dnw-dashboard-footer a:focus-visible {
  outline: 0.1875rem solid var(--dash-accent, currentColor);
  outline-offset: -0.1875rem;
}
@supports (height: 100dvh) {
  .dashboard-body .dashboard-container { height: 100dvh; }
}
