/* Separate from app sheets so navigation and live refresh cannot dismiss the choice. */
#analytics-controls { position: relative; z-index: 120; font-family: inherit; }
#analytics-controls [hidden] { display: none !important; }
.analytics-consent { position: static; margin: 24px auto; width: min(520px, calc(100vw - 32px)); max-height: none; overflow-y: visible; padding: 20px; box-sizing: border-box; border: 1px solid #655c53; border-radius: 14px; background: #191613; color: #fff9f2; box-shadow: 0 8px 36px #0006; }
.analytics-consent h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.analytics-consent p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.analytics-consent a { color: #ffb781; text-decoration: underline; }
.analytics-consent .analytics-status:empty { display: none; }
.analytics-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.analytics-actions button { flex: 1 1 140px; min-height: 44px; padding: 10px; border: 1px solid #c7b7a6; border-radius: 8px; background: #2c2621; color: #fff9f2; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.analytics-actions button:focus-visible, .analytics-preferences:focus-visible { outline: 3px solid #ffb781; outline-offset: 3px; }
.analytics-preferences { display: none !important; }
.analytics-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.analytics-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Optional tracking must not cover sign-in or support. Keep these choices in document
   flow so the form remains usable without accepting or rejecting analytics first.
   Other app pages retain their existing placement (notably the fixed chat composer). */
body:has(.auth-layout, .contact-page) #analytics-controls { z-index: auto; padding: 16px; }
body:has(.auth-layout, .contact-page) .analytics-consent { position: static; width: min(100%, 420px); max-height: none; margin: 0 auto; overflow: visible; }
body:has(.auth-layout, .contact-page) .analytics-preferences { position: static; display: block; margin: 0 auto; min-height: 44px; }
