/* Accessibility Widget */
.a11y-trigger{
  position:fixed;
  bottom:90px;
  left:22px;
  z-index:1200;
  width:48px;
  height:48px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.9);
  background:#1e3a5f;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 18px rgba(0,0,0,.22);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
  padding:0;
  outline:none;
}
.a11y-trigger:hover{background:#2a5298;box-shadow:0 6px 24px rgba(0,0,0,.28);transform:scale(1.06)}
.a11y-trigger:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}
.a11y-trigger svg{width:26px;height:26px;flex-shrink:0}

.a11y-panel{
  position:fixed;
  bottom:150px;
  left:22px;
  z-index:1201;
  width:280px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 12px 48px rgba(0,0,0,.18);
  border:1px solid #e2e8f0;
  padding:0;
  overflow:hidden;
  visibility:hidden;
  opacity:0;
  transform:translateY(8px) scale(.97);
  transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;
  direction:rtl;
}
.a11y-panel.open{
  visibility:visible;
  opacity:1;
  transform:translateY(0) scale(1);
  transition:opacity .2s ease,transform .2s ease,visibility 0s;
}

.a11y-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px 12px;
  background:#1e3a5f;
  color:#fff;
}
.a11y-panel-header h2{
  margin:0;
  font-size:.9rem;
  font-weight:600;
  letter-spacing:.02em;
}
.a11y-close{
  background:none;
  border:none;
  color:rgba(255,255,255,.85);
  cursor:pointer;
  padding:4px;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:color .15s,background .15s;
  outline:none;
}
.a11y-close:hover{color:#fff;background:rgba(255,255,255,.15)}
.a11y-close:focus-visible{outline:2px solid #f59e0b;outline-offset:2px}
.a11y-close svg{width:18px;height:18px}

.a11y-options{
  padding:10px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.a11y-btn{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
  color:#1e293b;
  font-size:.82rem;
  font-weight:500;
  cursor:pointer;
  text-align:right;
  transition:background .15s,border-color .15s,color .15s;
  outline:none;
  font-family:inherit;
  min-height:44px;
  width:100%;
}
.a11y-btn:hover{background:#f8fafc;border-color:#cbd5e1}
.a11y-btn:focus-visible{outline:3px solid #1e3a5f;outline-offset:2px}
.a11y-btn[aria-pressed="true"]{background:#eef4ff;border-color:#1e3a5f;color:#1e3a5f}
.a11y-btn[aria-pressed="true"] .a11y-btn-icon{color:#1e3a5f}
.a11y-btn-icon{
  flex-shrink:0;
  width:20px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:1rem;
  transition:color .15s;
}
.a11y-btn-label{flex:1;line-height:1.3}

.a11y-reset-row{
  padding:8px 12px 12px;
  border-top:1px solid #f1f5f9;
}
.a11y-reset{
  width:100%;
  padding:9px;
  border:1.5px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  color:#64748b;
  font-size:.8rem;
  font-weight:500;
  cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
  outline:none;
  font-family:inherit;
  min-height:40px;
}
.a11y-reset:hover{background:#fef2f2;border-color:#fca5a5;color:#dc2626}
.a11y-reset:focus-visible{outline:3px solid #1e3a5f;outline-offset:2px}

/* Body/html class effects */
html.a11y-large{font-size:115%}
html.a11y-xlarge{font-size:130%}
html.a11y-small{font-size:90%}

body.a11y-hc{
  background:#fff!important;
  color:#000!important;
}
body.a11y-hc *:not(img):not(svg):not(video):not(canvas){
  background-color:transparent!important;
  color:inherit!important;
  border-color:#000!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
body.a11y-hc a,body.a11y-hc a *{color:#00008b!important;text-decoration:underline!important}
body.a11y-hc button,body.a11y-hc [role="button"]{
  background:#000!important;
  color:#fff!important;
  border:2px solid #000!important;
}
body.a11y-hc h1,body.a11y-hc h2,body.a11y-hc h3,body.a11y-hc h4,body.a11y-hc h5,body.a11y-hc h6{color:#000!important}
body.a11y-hc img{filter:none!important}

body.a11y-no-anim *{
  transition:none!important;
  animation:none!important;
  scroll-behavior:auto!important;
}

body.a11y-hl a{
  text-decoration:underline!important;
  outline:1.5px dashed currentColor!important;
  outline-offset:2px!important;
}

body.a11y-readable{
  font-family:Arial,Helvetica,sans-serif!important;
}

/* Mobile overrides */
@media(max-width:640px){
  .a11y-trigger{
    bottom:calc(78px + env(safe-area-inset-bottom,0px));
    left:16px;
    width:44px;
    height:44px;
  }
  .a11y-trigger svg{width:22px;height:22px}
  .a11y-panel{
    bottom:calc(138px + env(safe-area-inset-bottom,0px));
    left:16px;
    right:16px;
    width:auto;
  }
}

/* Respect system reduced-motion for widget transitions only */
@media(prefers-reduced-motion:reduce){
  .a11y-trigger{transition:none}
  .a11y-panel{transition:none}
  .a11y-panel.open{transition:none}
}
