/* ==========================================================================
   app.css — small site-wide styles shared by every page.
   ========================================================================== */

/* Accessibility: users who ask their OS for reduced motion should not get the
   continuously falling maple-leaf background (a common vestibular trigger).
   Freeze the leaves and hide the animated layer. */
@media (prefers-reduced-motion: reduce) {
  .leaf, .stage .leaf { animation: none !important; }
  .bg, .stage         { display: none !important; }
}

/* Role switch: Patient / Clinician pill. Mirrors the language pill visually but
   sits on the leading top corner (top-left in LTR, top-right in RTL) so the two
   never collide. Labels + behaviour come from app.js. */
#canRoleSwitch {
  position: fixed; top: 8px; inset-inline-start: 10px; z-index: 1000;
  display: flex; gap: 4px;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,.08); border-radius: 999px; padding: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  font-family: system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial;
}
#canRoleSwitch button {
  border: 0; background: transparent; cursor: pointer; font-weight: 700;
  font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 999px;
  color: #6b7280; white-space: nowrap; transition: background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
#canRoleSwitch button.active { background: #e63946; color: #fff; }
#canRoleSwitch button:hover:not(.active) { color: #e63946; }
@media (max-width: 480px) {
  #canRoleSwitch { top: 6px; inset-inline-start: 6px; padding: 2px; gap: 3px; }
  #canRoleSwitch button { font-size: 11px; padding: 5px 7px; }
}
@media print { #canRoleSwitch { display: none; } }
