/* The cookie banner (lib/ui/pa.js). Its own colours, light and dark, so it
   reads the same on every page; the theme follows data-theme, which pa.js
   sets, and the system's appearance where a page manages its own theme. */
.pa-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147483000;
  max-width: 760px; margin: 0 auto; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(120, 113, 108, .35); background: #ffffff; color: #1c1917;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}
.pa-consent[hidden] { display: none; }
.pa-consent-text { margin: 0; flex: 1 1 22rem; }
.pa-consent-text a { color: inherit; text-decoration: underline; }
.pa-consent-actions { display: flex; gap: 8px; flex: none; }
.pa-btn {
  font: 600 14px/1 inherit; padding: 10px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(120, 113, 108, .45); background: transparent; color: inherit;
}
.pa-btn-pri { background: #1c1917; border-color: #1c1917; color: #fafaf9; }
.pa-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

:root[data-theme="dark"] .pa-consent { background: #1c1917; color: #f5f5f4; border-color: rgba(214, 211, 209, .25); }
:root[data-theme="dark"] .pa-btn-pri { background: #f5f5f4; border-color: #f5f5f4; color: #1c1917; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pa-consent { background: #1c1917; color: #f5f5f4; border-color: rgba(214, 211, 209, .25); }
  :root:not([data-theme="light"]) .pa-btn-pri { background: #f5f5f4; border-color: #f5f5f4; color: #1c1917; }
}

/* Pinned-to-the-bottom things move up while the banner is open. */
.pa-lifted { bottom: 132px !important; }
@media (max-width: 640px) { .pa-lifted { bottom: 200px !important; } }

/* The Practice banner (lib/practice.mjs): on every page of the practice
   dashboard, never dismissable, the same in both themes. */
.pa-practice {
  position: sticky; top: 0; z-index: 2147483001; box-sizing: border-box; width: 100%;
  padding: 8px 16px; text-align: center; background: #b45309; color: #fff;
  font: 600 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Polyaly (lib/ui/pa.js): a button at the corner, and a panel above it. */
.pa-polyaly-open {
  position: fixed; right: 16px; bottom: 16px; z-index: 2147482999;
  font: 600 14px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 12px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: #1c1917; color: #fafaf9; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.pa-polyaly {
  position: fixed; right: 16px; bottom: 72px; z-index: 2147483000; box-sizing: border-box;
  width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 640px); display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 12px; border: 1px solid rgba(120, 113, 108, .35); background: #fff; color: #1c1917;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pa-polyaly[hidden] { display: none; }
.pa-polyaly-title { margin: 0; font-weight: 700; }
/* Where the question goes, before it is asked: small, and never hidden. */
.pa-polyaly-where { margin: 0; font-size: 12.5px; line-height: 1.45; opacity: .8; }
.pa-polyaly-log { overflow-y: auto; flex: 1 1 auto; min-height: 60px; }
.pa-polyaly-log p { margin: 0 0 8px; white-space: pre-wrap; }
.pa-polyaly-you { font-weight: 600; }
.pa-polyaly-tip { font-style: italic; }
.pa-polyaly-error { color: #b91c1c; }
.pa-polyaly-confirm { border: 1px solid rgba(120, 113, 108, .45); border-radius: 8px; padding: 8px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.pa-polyaly-confirm p { flex-basis: 100%; }
.pa-polyaly-form { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-polyaly-input { flex: 1 1 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid rgba(120, 113, 108, .45); background: transparent; color: inherit; }
:root[data-theme="dark"] .pa-polyaly { background: #1c1917; color: #f5f5f4; }
:root[data-theme="dark"] .pa-polyaly-open { background: #f5f5f4; color: #1c1917; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pa-polyaly { background: #1c1917; color: #f5f5f4; }
  :root:not([data-theme="light"]) .pa-polyaly-open { background: #f5f5f4; color: #1c1917; }
}
