/* Cookie consent bar (static/cb-consent.js). Europe only. Small, non-blocking,
   two equal buttons. Uses the page's theme variables (dark/light) and the
   html[data-density] sizes. On the map page it sits in the layout below the map
   (never over map controls or the station panel); elsewhere it is a bottom card. */
.cb-consent[hidden] { display: none !important; }
.cb-consent {
    position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
    width: min(720px, calc(100% - 24px)); z-index: 2500;
    display: flex; align-items: center; gap: 0.625rem 1rem;
    padding: 0.75rem 0.875rem;
    background: var(--bg-card, #1a1d27); color: var(--text, #e4e4e7);
    border: 1px solid var(--border, #2a2d37); border-radius: 0.75rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    font: 400 0.875rem/1.45 var(--font, 'Inter', system-ui, sans-serif);
}
.cb-consent--inline {
    position: relative; left: auto; bottom: auto; transform: none; width: auto;
    flex-shrink: 0; z-index: 1000; border-radius: 0; border-width: 1px 0 0;
    box-shadow: none; padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}
.cb-consent-text { margin: 0; flex: 1 1 auto; min-width: 0; color: var(--text, #e4e4e7); }
.cb-consent-link { color: var(--text-secondary, #a1a1aa); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cb-consent-link:hover { color: var(--text, #e4e4e7); }
.cb-consent-btns { display: flex; gap: 0.5rem; flex-shrink: 0; }
/* Accept and Reject look exactly the same (same size, colour and weight). */
.cb-consent-btn {
    min-height: 2.25rem; min-width: 6rem; padding: 0 1rem;
    border-radius: 0.5rem; border: 1px solid var(--border, #2a2d37);
    background: var(--bg-card-hover, #22252f); color: var(--text, #e4e4e7);
    font: 600 0.875rem var(--font, 'Inter', system-ui, sans-serif); cursor: pointer;
}
.cb-consent-btn:hover { border-color: var(--primary, #3b82f6); }
.cb-consent-btn:focus-visible { outline: 2px solid var(--primary, #3b82f6); outline-offset: 2px; }
.cb-consent-btn[aria-pressed="true"] { border-color: var(--primary, #3b82f6); }

html[data-density="compact"] .cb-consent { font-size: 0.8125rem; }
html[data-density="compact"] .cb-consent-btn { min-height: 2rem; font-size: 0.8125rem; min-width: 5.5rem; }
html[data-density="large"] .cb-consent { font-size: 1rem; gap: 0.75rem 1.25rem; }
html[data-density="large"] .cb-consent--inline { padding: 0.75rem 1rem; }
html[data-density="large"] .cb-consent-btn { min-height: 3rem; min-width: 8rem; font-size: 1.0625rem; border-radius: 0.625rem; }

/* Room for the card at the end of scrolling pages */
html.cb-consent-open body { padding-bottom: var(--cb-consent-space, 0px); }

@media (max-width: 640px) {
    .cb-consent { flex-wrap: wrap; }
    .cb-consent-text { flex-basis: 100%; }
    .cb-consent-btns { flex: 1 1 100%; }
    .cb-consent-btn { flex: 1 1 0; }
}
