.floating-actions {
  position: relative;
  z-index: 100;
}
.floating-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-height: 48px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 2rem;
  box-shadow: 0 2px 8px #0005;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.floating-action[hidden] { display: none; }
.floating-action svg { width: 1.5rem; height: 1.5rem; flex: none; }
.floating-action span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.floating-whatsapp {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  background: #087a3e;
}
.floating-accessibility {
  position: fixed;
  top: 120px;
  left: max(1rem, env(safe-area-inset-left));
  background: #144d80;
}
.floating-accessibility-panel {
  position: fixed;
  top: 55px;
  left: max(1rem, env(safe-area-inset-left));
  width: min(380px, calc(100vw - 2rem));
  box-sizing: border-box;
  max-height: calc(100dvh - 70px);
  overflow: auto;
  padding: 0;
  border: 4px solid #eee;
  border-radius: 0;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 8px #0005;
}
.floating-accessibility-panel[hidden] { display: none; }
.floating-accessibility-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 .5rem 0 0; background: #2176b2; color: #fff; font-size: 1rem; }
.floating-accessibility-heading .floating-accessibility-close { min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.floating-accessibility-panel .accessibility-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}
.floating-accessibility-panel label { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; margin: 0; padding: .35rem 1rem; border-bottom: 1px solid #ddd; color: #222; font-size: .95rem; line-height: 1.35; cursor: pointer; }
.floating-accessibility-panel label:hover { background: #f2f7fa; }
.floating-accessibility-panel label svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.floating-accessibility-panel label span { flex: 1; }
.floating-accessibility-panel input[type="checkbox"] { appearance: none; flex: none; position: relative; width: 46px; height: 24px; margin: 0; border: 2px solid #777; border-radius: 999px; background: #777; cursor: pointer; }
.floating-accessibility-panel input[type="checkbox"]::before { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.floating-accessibility-panel input[type="checkbox"]:checked { border-color: #145685; background: #145685; }
.floating-accessibility-panel input[type="checkbox"]:checked::before { right: 24px; }
.floating-accessibility-panel #reset-settings { min-height: 2.75rem; border: 0; background: #eee; color: #222; font: inherit; cursor: pointer; }
.floating-accessibility-panel :focus-visible { outline: 3px solid #144d80; outline-offset: -3px; }
.floating-accessibility-heading :focus-visible { outline-color: #fff; }
@media (forced-colors: active) {
  .floating-accessibility-panel input[type="checkbox"] { appearance: auto; width: 1.25rem; height: 1.25rem; }
  .floating-accessibility-panel input[type="checkbox"]::before { content: none; }
}
.floating-action:hover { color: #fff; filter: brightness(.85); }
.floating-action:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
@media (max-width: 480px) {
  .floating-whatsapp { bottom: max(.75rem, env(safe-area-inset-bottom)); right: max(.75rem, env(safe-area-inset-right)); }
  .floating-accessibility, .floating-accessibility-panel { left: max(.75rem, env(safe-area-inset-left)); }
  .floating-action { padding: 0; font-size: .9rem; }
}

/* Accessibility preferences override the theme's component-specific colours. */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.a11y-keyboard :focus { outline: 3px solid #f90 !important; outline-offset: 3px !important; }
html.a11y-font body, html.a11y-font body * { font-family: Arial, sans-serif !important; }
html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override), html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override) * {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
}
html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override) :is(a, button, label, summary, input, select, textarea),
html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override) :is(a, button, label, summary) * {
  color: #ff0 !important;
  border-color: #ff0 !important;
}
html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override) :is(input, select, textarea) { accent-color: #ff0; }
html.a11y-contrast body:not(#a11y-override#a11y-override#a11y-override) :focus-visible { outline: 3px solid #ff0 !important; outline-offset: 3px !important; }
html.a11y-contrast.a11y-keyboard body:not(#a11y-override#a11y-override#a11y-override) :focus { outline-color: #f90 !important; }
html.a11y-headings body:not(#a11y-override#a11y-override#a11y-override) :is(h1, h2, h3, h4, h5, h6),
html.a11y-headings body:not(#a11y-override#a11y-override#a11y-override) :is(h1, h2, h3, h4, h5, h6) * {
  background: #ff0 !important; color: #000 !important;
}
html.a11y-underline body:not(#a11y-override#a11y-override#a11y-override) :is(a, button, summary, [role="button"]),
html.a11y-underline body:not(#a11y-override#a11y-override#a11y-override) :is(a, button, summary, [role="button"]) * {
  background: #ff0 !important; color: #000 !important; border-color: #000 !important;
  text-decoration: underline !important;
}
html.a11y-contrast .floating-accessibility-panel label:has(input:checked) { outline: 2px solid #ff0; outline-offset: -2px; }
