/* Accessibility Intellect */
.ai-accessibility-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  cursor: pointer; border: 1px solid currentColor; border-radius: 10px;
  padding: .75em 1em; background: #fff; color: #111; font: inherit;
}
.ai-accessibility-panel {
  position: fixed; z-index: 999999; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 28px)); max-height: min(85vh, 760px); overflow: auto;
  background: #fff; color: #171717; border: 1px solid #d9d9d9; border-radius: 14px;
  box-shadow: 0 16px 60px rgba(0,0,0,.28); font: 16px/1.45 system-ui, -apple-system, sans-serif;
}
.ai-accessibility-panel[hidden], .ai-accessibility-backdrop[hidden] { display: none !important; }
.ai-panel-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #ddd; }
.ai-panel-header strong { font-size:1.2em; }
.ai-icon-button { border:0; background:transparent; color:inherit; font-size:30px; cursor:pointer; line-height:1; }
.ai-panel-body { padding:18px 20px 20px; }
.ai-control-group { border:0; padding:0; margin:0 0 20px; min-width:0; }
.ai-control-group legend { font-weight:700; margin-bottom:10px; padding:0; }
.ai-button-row { display:flex; flex-wrap:wrap; gap:8px; }
.ai-button-row button, .ai-reset-row button, .ai-speech-row button {
  border:1px solid #777; background:#fff; color:#111; border-radius:8px; padding:9px 12px;
  font:inherit; cursor:pointer; min-height:42px;
}
.ai-button-row button[aria-pressed="true"] { background:#000 !important; color:#fff !important; outline:2px solid #000; outline-offset:1px; border-color:#000; }
.ai-theme-row button { flex:1 1 auto; }
.ai-theme-row [data-ai-theme="black-white"] { background:#fff;color:#000; }
.ai-theme-row [data-ai-theme="white-black"] { background:#000;color:#fff; }
.ai-options-row button { flex:1 1 180px; }
.ai-speech-row button { flex:1 1 130px; }
.ai-speech-row button:disabled { opacity:.45; cursor:not-allowed; }
.ai-speed-label { display:block; margin:12px 0 5px; }
.ai-accessibility-panel select { font:inherit; padding:8px; border:1px solid #777; border-radius:6px; background:#fff; color:#111; }
.ai-speech-note { font-size:.85em; margin:8px 0 0; color:#555; }
.ai-reset-row { border-top:1px solid #ddd; padding-top:16px; }
.ai-accessibility-backdrop { position:fixed; z-index:999998; inset:0; background:rgba(0,0,0,.55); }
.ai-accessibility-panel button:focus-visible, .ai-accessibility-trigger:focus-visible, .ai-accessibility-panel select:focus-visible { outline:3px solid #1769e0; outline-offset:3px; }
html.ai-theme-black-white body { background:#fff !important; color:#000 !important; }
html.ai-theme-white-black body { background:#000 !important; color:#fff !important; }
html.ai-theme-black-white body *, html.ai-theme-white-black body * { color:inherit !important; border-color:currentColor !important; }
html.ai-theme-white-black body * { background-color:transparent; }
html.ai-theme-white-black body :is(header, footer, main, section, article, .elementor-section, .e-con) { background-color:#000 !important; }
html.ai-theme-yellow-black body :is(header, footer, main, section, article, .elementor-section, .e-con) { background-color:#000 !important; }

@media (max-width:600px) {
 .ai-accessibility-panel { width:calc(100vw - 20px); max-height:90vh; }
 .ai-panel-body { padding:14px; }
 .ai-button-row button { padding:8px 10px; }
}

/* Keep the settings panel scrollable while the page behind it is locked. */
.ai-accessibility-panel { overscroll-behavior: contain; }


/* The widget controls keep their own neutral appearance in every site color scheme. */
.ai-accessibility-panel,
.ai-accessibility-panel *,
.ai-accessibility-backdrop {
  color-scheme: light !important;
}
.ai-accessibility-panel {
  background: #fff !important;
  color: #171717 !important;
}
.ai-accessibility-panel * {
  color: inherit;
}
.ai-accessibility-panel button,
.ai-accessibility-panel select {
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
}
.ai-accessibility-panel button[aria-pressed="true"] {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}
.ai-accessibility-panel .ai-accessibility-close {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}
.ai-accessibility-panel button:disabled {
  color: #999 !important;
  background: #fff !important;
  border-color: #bbb !important;
}


/* Isolate the settings dialog from the selected page color scheme. */
html.ai-theme-black-white #ai-accessibility-panel,
html.ai-theme-black-white #ai-accessibility-panel *,
html.ai-theme-white-black #ai-accessibility-panel,
html.ai-theme-white-black #ai-accessibility-panel * {
  background-image: none !important;
}
html.ai-theme-black-white #ai-accessibility-panel {
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
}
html.ai-theme-black-white #ai-accessibility-panel *,
html.ai-theme-white-black #ai-accessibility-panel * {
  color: inherit;
}
html.ai-theme-white-black #ai-accessibility-panel {
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
}
html.ai-theme-white-black #ai-accessibility-panel :is(button, select, input, textarea) {
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
}
html.ai-theme-black-white #ai-accessibility-panel :is(button, select, input, textarea) {
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
}
html.ai-theme-black-white #ai-accessibility-panel button[aria-pressed="true"],
html.ai-theme-white-black #ai-accessibility-panel button[aria-pressed="true"] {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}
html.ai-theme-black-white #ai-accessibility-panel .ai-accessibility-close,
html.ai-theme-white-black #ai-accessibility-panel .ai-accessibility-close {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}





/* v1.1.4: selected controls must visibly reflect aria-pressed state in every theme. */
#ai-accessibility-panel .ai-button-row button[aria-pressed="true"],
#ai-accessibility-panel button[aria-pressed="true"] {
  background: #000 !important;
  background-color: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
  outline: 2px solid #000 !important;
  outline-offset: 2px !important;
}

/* Unselected color-scheme buttons remain neutral; only the selected button is black. */
#ai-accessibility-panel [data-ai-theme="black-white"][aria-pressed="false"],
#ai-accessibility-panel [data-ai-theme="white-black"][aria-pressed="false"],
#ai-accessibility-panel [data-ai-font][aria-pressed="false"] {
  background: #fff !important;
  background-color: #fff !important;
  color: #171717 !important;
  border-color: #777 !important;
  outline: none !important;
}


/* v1.3.2: keep panel button spacing independent from theme and Elementor styles */
html body #ai-accessibility-panel button,
html body .ai-accessibility-panel button {
  padding: 15px !important;
  box-sizing: border-box;
}
