/* =========================================
   WP Firefly Accessibility — Frontend CSS
   (Launcher button + global content modes)
   The panel itself is in Shadow DOM (styled in JS).
   ========================================= */

/* Global focus outlines */
.wpfirefly-force-focus :where(a,button,[role='button'],input,select,textarea,summary):focus{
  outline:3px solid var(--wpf-a11y-accent,#2b8cff);
  outline-offset:2px;
}

/* Launcher button (chunkier by default) */
#wpfirefly-a11y-btn{
  position:fixed; /* exact left/right/top/bottom set in JS */
  z-index:99998;
  border:0;
  border-radius:16px;
  padding:1rem 1.2rem;
  background:var(--wpf-a11y-btn-bg,#1f2937);
  color:var(--wpf-a11y-btn-fg,#fff);
  cursor:pointer;
  font:700 16px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  box-shadow:0 12px 24px rgba(0,0,0,.28);
  display:flex;align-items:center;gap:.7rem;
  transition:transform .08s ease-in-out;
}
#wpfirefly-a11y-btn:hover{transform:translateY(-1px)}
#wpfirefly-a11y-btn svg{display:block}

/* If there is no text label, keep the button tight around the icon */
#wpfirefly-a11y-btn[data-has-label="false"]{ padding:.9rem }

/* ---------- Global content modes (site only) ---------- */

/* REM scaling */
:root{ --wpfirefly-scale:1 }
html.wpfirefly-fontscaled{ font-size:calc(16px * var(--wpfirefly-scale)) }

/* High contrast (site content) */
html.wpfirefly-contrast,
html.wpfirefly-contrast body{ background:#000 !important; color:#fff !important }
html.wpfirefly-contrast a{ color:#9CDCFE !important; text-decoration:underline }
html.wpfirefly-contrast :where(button,input,select,textarea){
  background:#111 !important; color:#fff !important; border-color:#fff !important
}

/* Text spacing */
html.wpfirefly-textspacing body{
  line-height:1.5 !important; letter-spacing:.12em !important; word-spacing:.16em !important
}
html.wpfirefly-textspacing p,
html.wpfirefly-textspacing li{ margin-bottom:1em }

/* Reduced motion */
html.wpfirefly-reduced-motion *{
  animation:none !important; transition:none !important; scroll-behavior:auto !important
}
