/* SMDG Accessibility Widget (Osclass) */
:root{
  --smdg-font-scale: 1;
  --smdg-letter-spacing: 0px;
  --smdg-line-height: 1.6;
}
html.smdg-a11y-scale { font-size: calc(16px * var(--smdg-font-scale)); }
html.smdg-a11y-ls * { letter-spacing: var(--smdg-letter-spacing) !important; }
html.smdg-a11y-lh * { line-height: var(--smdg-line-height) !important; }

html.smdg-contrast,
html.smdg-contrast body {
  background:#000 !important; color:#fff !important;
}
html.smdg-contrast a{ color:#ff0 !important; text-decoration: underline; }

html.smdg-invert { filter: invert(1) hue-rotate(180deg); }
html.smdg-grayscale { filter: grayscale(1); }

html.smdg-bigcursor, html.smdg-bigcursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><polygon points="0,0 0,48 12,36 28,60 36,54 20,30 36,30" fill="black" stroke="white" stroke-width="2"/></svg>') 0 0, auto !important;
}

/* Widget UI */
#smdg-a11y { position: fixed; right: 18px; bottom: 18px; z-index: 99999; }
#smdg-a11y-toggle {
  width:48px; height:48px; border-radius:999px; border:none;
  box-shadow:0 6px 20px rgba(0,0,0,.25); background:#111; color:#fff; font-size:22px; cursor:pointer;
}
#smdg-a11y-panel{
  position: fixed; right: 18px; bottom: 78px; width: 320px; max-width: calc(100vw - 36px);
  background:#fff; color:#111; border-radius:12px; box-shadow:0 12px 30px rgba(0,0,0,.3); padding:12px; display:none;
  font-size:14px;
}
#smdg-a11y-panel.open { display:block; }
#smdg-a11y-panel .smdg-a11y-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; }
#smdg-a11y-panel .smdg-a11y-row.grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#smdg-a11y-panel button{
  border:1px solid #ddd; background:#f8f8f8; padding:8px 10px; border-radius:8px; cursor:pointer;
}
#smdg-a11y-panel button[aria-pressed="true"]{ background:#111; color:#fff; border-color:#111; }
#smdg-a11y-panel .smdg-a11y-actions button{ min-width:48px; }
#smdg-a11y-panel .smdg-a11y-footer{ display:flex; justify-content:space-between; gap:8px; margin-top:8px; }
#smdg-a11y-panel .reset{ background:#ffe9e9; border-color:#ffc7c7; }
#smdg-a11y-panel .close{ background:#e9f3ff; border-color:#c7dfff; }

@media (prefers-reduced-motion:no-preference){
  #smdg-a11y-panel{ transition: transform .15s ease, opacity .15s ease; transform-origin: bottom right; }
  #smdg-a11y-panel.open{ transform: translateY(0); opacity:1; }
}
