/* =============================================================================
   Accessibility Widget — UI Styles + Accessibility State Overrides
   WCAG 2.2 / ADA / Section 508
   ============================================================================= */

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Bolditalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}


/* ── Skip Links ────────────────────────────────────────────────────────────── */
.aw-skip-links {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10000000;
  display: flex;
  gap: 4px;
}
.aw-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  white-space: nowrap;
}
.aw-skip-link:focus {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 3px solid #ff0;
  outline-offset: 2px;
}

/* ── Trigger Button ─────────────────────────────────────────────────────────── */
.aw-trigger {
  position: fixed;
  z-index: 99;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  background-color: var(--aw-color, #006CF2);
  color: #fff;
  transition: transform .2s, box-shadow .2s;
  padding: 0;
  outline-offset: 3px;
}
.aw-trigger:hover,
.aw-trigger:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
  outline: 3px solid var(--aw-color, #006CF2);
}
.aw-trigger svg,
.aw-trigger img { pointer-events: none; }
.aw-trigger i { font-size: 26px; pointer-events: none; }

/* ── Trigger positioning — shared by #aw-trigger and .govbh-accessibility-widget ── */
.aw-trigger[data-position="bottom-right"]  { bottom: var(--aw-margin, 20px);  right: var(--aw-margin, 20px);  left: auto;  top: auto; }

.aw-trigger[data-position="bottom-left"]   { bottom: var(--aw-margin, 20px);  left:  var(--aw-margin, 20px);  right: auto; top: auto; }

.aw-trigger[data-position="top-right"]     { top:    var(--aw-margin, 20px);  right: var(--aw-margin, 20px);  left: auto;  bottom: auto; }

.aw-trigger[data-position="top-left"]      { top:    var(--aw-margin, 20px);  left:  var(--aw-margin, 20px);  right: auto; bottom: auto; }

.aw-trigger[data-position="top-center"]    { top:    var(--aw-margin, 20px);  left: calc(50% - var(--aw-half-size, 30px)); right: auto; bottom: auto; }

.aw-trigger[data-position="bottom-center"] { bottom: var(--aw-margin, 20px);  left: calc(50% - var(--aw-half-size, 30px)); right: auto; top: auto; }

.aw-trigger[data-position="middle-left"]   { top: calc(50% - var(--aw-half-size, 30px)); left:  var(--aw-margin, 20px);  right: auto; bottom: auto; }

.aw-trigger[data-position="middle-right"]  { top: calc(50% - var(--aw-half-size, 30px)); right: var(--aw-margin, 20px);  left: auto;  bottom: auto; }

/* ── Mobile position override — shared by both ───────────────────────────── */
@media (max-width: 768px) {
  .aw-trigger[data-pos-mobile="bottom-right"] { bottom: var(--aw-margin, 16px) !important;  right: var(--aw-margin, 16px) !important;  left: auto !important;  top: auto !important; }

  .aw-trigger[data-pos-mobile="bottom-left"] { bottom: var(--aw-margin, 16px) !important;  left:  var(--aw-margin, 16px) !important;  right: auto !important; top: auto !important; }

  .aw-trigger[data-pos-mobile="top-right"]   { top:    var(--aw-margin, 16px) !important;  right: var(--aw-margin, 16px) !important;  left: auto !important;  bottom: auto !important; }

  .aw-trigger[data-pos-mobile="top-left"]    { top:    var(--aw-margin, 16px) !important;  left:  var(--aw-margin, 16px) !important;  right: auto !important; bottom: auto !important; }

  .aw-trigger[data-pos-mobile="top-center"]   { top:    var(--aw-margin, 16px) !important;  left: calc(50% - var(--aw-half-size, 30px)) !important; right: auto !important; bottom: auto !important; }

  .aw-trigger[data-pos-mobile="bottom-center"]{ bottom: var(--aw-margin, 16px) !important;  left: calc(50% - var(--aw-half-size, 30px)) !important; right: auto !important; top: auto !important; }

  .aw-trigger[data-pos-mobile="middle-left"]]   { top: calc(50% - var(--aw-half-size, 30px)) !important; left:  var(--aw-margin, 16px) !important;  right: auto !important; bottom: auto !important; }

  .aw-trigger[data-pos-mobile="middle-right"] { top: calc(50% - var(--aw-half-size, 30px)) !important; right: var(--aw-margin, 16px) !important;  left: auto !important;  bottom: auto !important; }
}

/* icon via button-style picker — JS sets exact px (button_size − 5); this is the medium fallback */
.aw-trigger .aw-trigger-icon { width: 55px; height: 55px; object-fit: contain; }

/* ── Panel ──────────────────────────────────────────────────────────────────── */
.aw-panel {
  position: fixed;
  z-index: 9999999;
  bottom: 0;
  top: 0;
  right: 0px;
  width: 520px;
  max-width: calc(100vw - 24px);
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.28);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #111;
  display: flex;
  flex-direction: column;
  outline: none;
  --aw-color: #006CF2;
  --aw-primary: #006CF2;
  --aw-sky: #57CEFB;
  --aw-amber: #F9AE40;
  --aw-deep: #002452;
  --aw-bg: #F4F8FD;
}
.aw-panel[data-position="top-left"],
.aw-panel[data-position="middle-left"],
.aw-panel[data-position="bottom-left"]   { right: auto; left: 0px; }
.aw-panel[data-position="top-right"],
.aw-panel[data-position="middle-right"],
.aw-panel[data-position="bottom-right"]  { right: 0px; left: auto; }
.aw-panel[data-position="top-center"],
.aw-panel[data-position="bottom-center"] { left: 50%; transform: translateX(-50%); right: auto; }

/* Oversize — 3-column grids become 2-column for larger cards */
.aw-panel.aw-oversize { width: 520px; max-width: calc(100vw - 24px); }
.aw-panel.aw-oversize .aw-grid-3 { grid-template-columns: 1fr 1fr; }


/* ── Panel Header (sticky) ──────────────────────────────────────────────────── */
.aw-panel-header {
  background: linear-gradient(135deg, var(--aw-color, #2563EB) 0%, color-mix(in srgb, var(--aw-color, #2563EB), black 22%) 100%);
  color: #fff;
  padding: 18px 20px 14px;
  flex-shrink: 0;
  overflow: hidden;
}
/* Close button — absolute top-right */
.aw-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.14);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
  z-index: 1;
}
.aw-panel-close:hover,
.aw-panel-close:focus-visible {
  background: rgba(255,255,255,.35);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.aw-panel-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 44px;
}
.aw-panel-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aw-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0;
}
.aw-panel-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  margin-top: 4px;
  line-height: 1.5;
}
.aw-panel-header-kbd {
  margin-top: 12px;
  display: flex;
  align-items: center;
}
.aw-shortcut-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}
.aw-shortcut-badge kbd {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-family: monospace;
}
.aw-shortcut-badge span {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
}

/* ── Header B (minimal white) ───────────────────────────────────────────────── */
.aw-header-b {
  background: #fff;
  flex-shrink: 0;
}
.aw-header-b-line {
  height: 5px;
  background: linear-gradient(90deg, var(--aw-color, #2563EB) 0%, color-mix(in srgb, var(--aw-color, #2563EB), black 22%) 100%);
}
.aw-header-b-content {
  padding: 16px 22px 14px;
}
.aw-header-b-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aw-header-b-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aw-header-b-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aw-header-b-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--aw-color, #0f172a) ;
  line-height: 1.1;
}
.aw-header-b-subtitle {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 1px;
}
.aw-header-b-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
/* Close button override for Header B */
.aw-panel-close--b {
  position: static;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  color: #94a3b8;
  z-index: auto;
}
.aw-panel-close--b:hover,
.aw-panel-close--b:focus-visible {
  background: #F1F5F9;
  outline: 2px solid var(--aw-color, #2563EB);
  outline-offset: 2px;
}
.aw-header-b-badges {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
}
.aw-header-b-badge {
  background: color-mix(in srgb, var(--aw-color, #2563EB), white 90%) 100%;
  border: 1px solid color-mix(in srgb, var(--aw-color, #2563EB), white 80%);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--aw-color, #2563EB);
  font-family: monospace;
  font-weight: 700;
}
.aw-header-b-sep {
  color: #CBD5E1;
  font-size: 10px;
  font-weight: 300;
}
/* ── Statement Bar ──────────────────────────────────────────────────────────── */
.aw-statement-bar {
  background: #f3f0ff;
  border-bottom: 1px solid #e0d7ff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}
.aw-statement-bar a {
  color: var(--aw-color, #006CF2);
  font-weight: 600;
  text-decoration: none;
  flex: 1;
}
.aw-statement-bar a:hover { text-decoration: underline; }

/* ── Panel Body ─────────────────────────────────────────────────────────────── */
.aw-panel-body {
  padding: 10px 0 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #F4F8FD;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.aw-panel-body::-webkit-scrollbar { width: 4px; }
.aw-panel-body::-webkit-scrollbar-track { background: transparent; }
.aw-panel-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.aw-panel-body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Config card (Language + Oversize) ──────────────────────────────────────── */
.aw-config-card {
  margin: 0 12px 8px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.aw-config-row {
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aw-config-row--border { border-bottom: 1px solid #EEF2F7; }
.aw-config-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

/* ── Language Picker ────────────────────────────────────────────────────────── */
.aw-lang-picker { position: relative; }
.aw-lang-current {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 32px 6px 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  min-width: 130px;
  text-align: left;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
}
.aw-lang-current:focus { outline: 2px solid var(--aw-color, #2563EB); outline-offset: 1px; }
.aw-lang-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.aw-lang-caret { display: none; }
.aw-flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.aw-lang-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.aw-lang-list::-webkit-scrollbar { width: 4px; }
.aw-lang-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.aw-lang-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  font-size: 12px; color: #374151; outline: none; transition: background .12s;
}
/* Some language names (native + English pairs) run long — truncate instead of
   wrapping/overflowing the fixed-width dropdown popup. */
.aw-lang-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-lang-opt:hover, .aw-lang-opt:focus { background: #EFF6FF; color: var(--aw-color, #2563EB); }
.aw-lang-selected { font-weight: 700; background: #EFF6FF; color: var(--aw-color, #2563EB); }

/* ── Shared dropdown popup (lang + custom select) ───────────────────────────── */
.aw-dropdown-popup {
  position: fixed;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
  z-index: 10000002;
  overflow: hidden;
  min-width: 180px;
  max-width: calc(100vw - 16px);
}
.aw-dropdown-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 7px;
  border-bottom: 1px solid #F1F5F9;
}
.aw-dropdown-search .aw-asset-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
.aw-dropdown-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12px;
  font-family: inherit;
  color: #1e293b;
  background: transparent;
}
.aw-dropdown-input::placeholder { color: #94a3b8; }

/* ── Custom Select (color blindness) ────────────────────────────────────────── */
.aw-custom-select { position: relative; display: inline-flex; min-width: 150px; }
.aw-custom-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 7px 10px 7px 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.aw-custom-select-btn:hover { border-color: #cbd5e1; }
.aw-custom-select-btn[aria-expanded="true"] {
  border-color: var(--aw-color, #2563EB);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aw-color, #2563EB), transparent 82%);
}
.aw-custom-select-caret { width: 16px; height: 16px; color: #64748b; flex-shrink: 0; }
.aw-custom-select-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.aw-custom-select-list::-webkit-scrollbar { width: 4px; }
.aw-custom-select-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.aw-custom-select-val {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.aw-custom-select-val span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-custom-select-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: background .1s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-custom-select-opt:hover,
.aw-custom-select-opt:focus { background: color-mix(in srgb, var(--aw-color, #EFF6FF), white 80%); color: var(--aw-color, #2563EB); }
.aw-custom-select-opt.aw-sel-active { font-weight: 700; background: color-mix(in srgb, var(--aw-color, #EFF6FF), white 80%); color: var(--aw-color, #2563EB); }

/* ── Section card ───────────────────────────────────────────────────────────── */
.aw-section {
  margin: 0 12px 8px;
  border-radius: 14px;
  overflow: hidden;
  /*box-shadow: 0 1px 8px rgba(0,0,0,0.08);*/
}
.aw-section-title {
  background: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border: none;
  width: 100%;
  text-align: left;
}
.aw-section-label {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
}
.aw-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-right: 8px;
  background: var(--aw-color, #2563EB);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
  flex-shrink: 0;
}
.aw-chevron-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--aw-color, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.aw-chevron-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  transition: transform .22s cubic-bezier(0.4,0,0.2,1);
}
.aw-section.collapsed .aw-chevron-btn { background: #F1F5F9; }
.aw-section.collapsed .aw-chevron-btn::after {
  border-top-color: #94a3b8;
  transform: rotate(-90deg);
}
.aw-section-content {
  background: #fff;
  padding: 12px 14px 16px;
  border-top: 1px solid #EEF2F7;
}
.aw-section.collapsed .aw-section-content { display: none; }

/* Font Adjustments section — blue left accent */
.aw-section--font {
  border-left: 4px solid var(--aw-color, #2563EB);
}
.aw-section--font .aw-section-title {
  background: #EFF6FF;
}
.aw-section--font .aw-section-label {
  color: var(--aw-color, #2563EB);
  font-weight: 700;
}
.aw-section--font .aw-section-content {
  border-top-color: #BFDBFE;
}
.aw-hint-text {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.aw-align-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
  margin: 12px 0 8px 2px;
}

/* ── Feature Grid ───────────────────────────────────────────────────────────── */
.aw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.aw-grid-2 { grid-template-columns: 1fr 1fr; }
.aw-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Feature Button (card style) ────────────────────────────────────────────── */
.aw-btn,
.aw-profile-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: #fff;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
  min-height: 100px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  user-select: none;
  font-family: inherit;
}
.aw-btn:hover,
.aw-profile-btn:hover {
  border-color: var(--aw-color, #2563EB);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.aw-btn:focus-visible,
.aw-profile-btn:focus-visible {
  outline: 2px solid var(--aw-color, #2563EB);
  outline-offset: 2px;
}
.aw-btn.active,
.aw-profile-btn.active {
  background: #EFF6FF;
  border-color: var(--aw-color, #2563EB);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

/* Checkmark in top-right corner when active */
.aw-check-mark {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 0 12px 0 10px;
  background: var(--aw-color, #2563EB);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.aw-check-mark::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.aw-btn.active .aw-check-mark,
.aw-profile-btn.active .aw-check-mark {
  display: flex;
}

/* Icon circle */
.aw-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.aw-btn.active .aw-icon-circle,
.aw-profile-btn.active .aw-icon-circle {
  background: #DBEAFE;
  color: var(--aw-color, #2563EB);
}

/* Card label */
.aw-card-label {
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  line-height: 1.3;
  text-align: center;
}
.aw-btn.active .aw-card-label,
.aw-profile-btn.active .aw-card-label {
  color: var(--aw-color, #2563EB);
}

/* ── Font Step Button (5-step progress bars) ────────────────────────────────── */
.aw-step-bars {
  display: none;
  gap: 4px;
  width: 100%;
  padding-top: 4px;
}
.aw-btn--step.active .aw-step-bars {
  display: flex;
}
.aw-step-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--aw-color, #2563EB) 20%, #EFF6FF);
  transition: background 0.15s;
}
.aw-btn--step[data-step="1"] .aw-step-bar:nth-child(-n+1),
.aw-btn--step[data-step="2"] .aw-step-bar:nth-child(-n+2),
.aw-btn--step[data-step="3"] .aw-step-bar:nth-child(-n+3),
.aw-btn--step[data-step="4"] .aw-step-bar:nth-child(-n+4),
.aw-btn--step[data-step="5"] .aw-step-bar:nth-child(-n+5) {
  background: var(--aw-color, #2563EB);
}

/* Asset SVG icons */
.aw-asset-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  color: currentColor;
}
.aw-trigger .aw-asset-icon { width: 32px; height: 32px; filter: brightness(0) invert(1); }
.aw-statement-bar .aw-asset-icon { width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(26%) sepia(97%) saturate(700%) hue-rotate(240deg); }

/* ── Stepper (inline) ───────────────────────────────────────────────────────── */
.aw-stepper-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aw-stepper-val { font-size: 12px; min-width: 24px; text-align: center; font-weight: 700; }
.aw-stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid #BFDBFE;
  background: #EFF6FF;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  color: var(--aw-color, #2563EB);
  line-height: 1;
  flex-shrink: 0;
}
.aw-stepper-btn:hover { background: var(--aw-color, #2563EB); color: #fff; border-color: var(--aw-color, #2563EB); }
.aw-stepper-btn:focus-visible { outline: 2px solid var(--aw-color, #2563EB); outline-offset: 2px; }

/* ── Select Row ─────────────────────────────────────────────────────────────── */
.aw-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 14px;
  gap: 8px;
}
.aw-select-row label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  flex: 1;
}

/* ── Pill Toggle (Normal / Oversize) ────────────────────────────────────────── */
.aw-pill-toggle {
  display: flex;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.aw-pill-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.aw-pill-btn.active {
  background: #fff;
  color: var(--aw-color, #2563EB);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.aw-pill-btn:focus-visible { outline: 2px solid var(--aw-color, #2563EB); outline-offset: 2px; }

/* ── Color Picker Rows ──────────────────────────────────────────────────────── */
.aw-color-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.aw-color-row { display: flex; align-items: center; gap: 10px;  padding: 8px; border-top: 1px solid #f1f5f9;}
.aw-color-row-label { font-size: 13px; font-weight: 500; color: #374151; flex: 1; }
.aw-color-pill {
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.aw-color-swatch {
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: block;
  position: relative;
  flex-shrink: 0;
  border-right: 1.5px solid #E2E8F0;
  background: #E2E8F0;
  transition: background .1s;
}
.aw-color-swatch input[type="color"] {
  position: absolute;
  opacity: 0;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  cursor: pointer;
}
.aw-color-hex {
  font-size: 11px;
  font-weight: 500;
  color: #CBD5E1;
  font-family: monospace;
  padding: 0 10px;
  min-width: 68px;
  user-select: none;
  transition: color .1s;
}
.aw-color-pill--set .aw-color-hex { color: #1e293b; }
.aw-clear-color {
  width: 32px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #E2E8F0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color .15s;
}
.aw-color-pill--set .aw-clear-color { color: #94a3b8; }
.aw-clear-color:hover { color: #DC2626; }

/* ── Translate Website Section ──────────────────────────────────────────────── */
.aw-section-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
}
.aw-trans-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 0 10px;
  margin-bottom: 12px;
}
.aw-trans-search-row svg { flex-shrink: 0; color: #94a3b8; }
.aw-trans-search {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #1e293b;
  padding: 9px 0;
  outline: none;
  font-family: inherit;
}
.aw-trans-search::placeholder { color: #94a3b8; }
.aw-trans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.aw-trans-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 10px 4px 9px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.aw-trans-btn:hover {
  border-color: var(--aw-color, #2563EB);
  background: #EFF6FF;
}
.aw-trans-btn.selected {
  border-color: var(--aw-color, #2563EB);
  background: #EFF6FF;
}
.aw-trans-btn.active {
  border-color: var(--aw-color, #2563EB);
  background: #DBEAFE;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--aw-color, #2563EB) 15%, transparent);
}
.aw-trans-flag-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: background .15s;
}
.aw-trans-flag-wrap .aw-flag { width: 26px; height: auto; }
.aw-trans-btn:hover .aw-trans-flag-wrap,
.aw-trans-btn.active .aw-trans-flag-wrap,
.aw-trans-btn.selected .aw-trans-flag-wrap { background: #BFDBFE; }
.aw-trans-name {
  font-size: 10px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
  width: 100%;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}
.aw-trans-btn:hover .aw-trans-name,
.aw-trans-btn.active .aw-trans-name,
.aw-trans-btn.selected .aw-trans-name { color: var(--aw-color, #2563EB); }
.aw-trans-en {
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  word-break: break-word;
}
.aw-trans-btn.active .aw-trans-en,
.aw-trans-btn.selected .aw-trans-en {
  color: color-mix(in srgb, var(--aw-color, #2563EB) 65%, #fff);
}
.aw-trans-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.aw-trans-apply-btn {
  width: 100%;
  padding: 10px;
  background: var(--aw-color, #2563EB);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 5px;
}
.aw-trans-apply-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.aw-trans-apply-btn:not(:disabled):hover { opacity: 0.88; }
.aw-trans-apply-btn:focus-visible { outline: 2px solid var(--aw-color, #2563EB); outline-offset: 2px; }
.aw-trans-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  color: #DC2626;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.aw-trans-clear:hover { background: #FEE2E2; }
.aw-trans-clear:focus-visible { outline: 2px solid #DC2626; outline-offset: 2px; }
.aw-trans-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 8px;
}
.aw-trans-powered img { width: 14px; height: 14px; object-fit: contain; }

/* ── Search Wiki Section ────────────────────────────────────────────────────── */
.aw-wiki-section .aw-section-content{
  padding: 0;
}

.aw-wiki-body {
  max-height: 220px;
  overflow-y: auto;
  /*margin: 0 -14px;*/
  padding: 0 14px;
}
.aw-wiki-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}
.aw-wiki-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #E2E8F0;
  border-top-color: var(--aw-color, #2563EB);
  border-radius: 50%;
  animation: aw-wiki-spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes aw-wiki-spin { to { transform: rotate(360deg); } }
.aw-wiki-results:empty { display: none; }
.aw-wiki-result {
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}
.aw-wiki-result:last-child { border-bottom: none; }
.aw-wiki-result-title {
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 3px;
}
.aw-wiki-result-snippet {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aw-wiki-result-link {
  font-size: 12px;
  color: var(--aw-color, #2563EB);
  text-decoration: none;
  font-weight: 600;
}
.aw-wiki-result-link:hover { text-decoration: underline; }
.aw-wiki-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1.5px solid var(--aw-color, #2563EB);
  background: #F8FAFC;
  /*margin: 8px -14px -16px;*/
  color: #64748B;
}
.aw-wiki-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #374151;
  outline: none;
  font-family: inherit;
}
.aw-wiki-input::placeholder { color: #94a3b8; }

/* ── Footer card ────────────────────────────────────────────────────────────── */
.aw-footer-card {
  margin: 0 12px 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  padding: 14px 18px 18px;
}
.aw-footer-reset {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.aw-reset-btn {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: var(--aw-color, #2563EB);
  border-radius: 8px;
  padding: 9px 28px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.aw-reset-btn:hover { background: #DBEAFE; }
.aw-report-link {
  font-size: 12px;
  color: #64748B;
  text-decoration: underline;
}
.aw-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
  border-top: 1px solid #F1F5F9;
}
.aw-footer-links-sep {
  font-size: 11px;
  color: #CBD5E1;
  line-height: 1;
}
.aw-statement-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #64748B;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
.aw-statement-btn:hover { color: var(--aw-color, #006CF2); }

/* ── Accessibility Statement Modal ─────────────────────────────────────────── */
.aw-statement-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.aw-statement-modal-inner {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 82vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.aw-statement-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #E2E8F0;
  flex-shrink: 0;
}
.aw-statement-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
}
.aw-statement-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #64748B;
  display: flex;
  align-items: center;
  line-height: 1;
}
.aw-statement-modal-close:hover { background: #F1F5F9; }
.aw-statement-modal-body {
  overflow-y: auto;
  padding: 20px 24px 24px;
  flex: 1;
}
.aw-statement-modal-body section { margin-bottom: 18px; }
.aw-statement-modal-body section:last-child { margin-bottom: 0; }
.aw-statement-modal-body h3 {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.aw-statement-modal-body p {
  font-size: 13px;
  color: #334155;
  margin: 0;
  line-height: 1.65;
}
.aw-statement-modal-body ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.aw-statement-modal-body li {
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
}
.aw-statement-modal-body a { color: var(--aw-color, #006CF2); }

/* ── Built By ───────────────────────────────────────────────────────────────── */
.aw-built-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}
.aw-built-by-label {
  font-size: 9px;
  color: #D1D5DB;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.aw-built-by a {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.aw-built-by a:hover { opacity: .85; }
.aw-built-by-logo {
  height: 20px;
  width: auto;
  vertical-align: middle;
}

/* ── Dictionary Notification Card ───────────────────────────────────────────── */
.aw-dict-notif { flex-direction: column; padding: 0; overflow: hidden; max-height: 420px; }

.aw-dict-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1.5px solid #e2e8f0;
  flex-shrink: 0;
}
.aw-dict-word-wrap { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.aw-dict-word-title { font-size: 18px; font-weight: 800; color: #1e293b; }
.aw-dict-pos-header { font-size: 11px; color: var(--aw-color, #2563EB); font-style: italic; font-weight: 600; white-space: nowrap; }

.aw-dict-body {
  overflow-y: auto; padding: 10px 14px 12px;
  font-size: 13px; line-height: 1.6; color: #374151;
  flex: 1;
}
.aw-dict-loading { color: #94a3b8; font-style: italic; padding: 8px 0; }

.aw-dict-entry { padding-bottom: 8px; }
.aw-dict-entry-sep { border-top: 1.5px solid #e2e8f0; padding-top: 10px; margin-top: 6px; }

.aw-dict-entry-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.aw-dict-pos-badge {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--aw-color, #2563EB); background: color-mix(in srgb, var(--aw-color, #2563EB) 12%, white);
  padding: 2px 8px; border-radius: 20px;
}
.aw-dict-lang-tag { font-size: 11px; color: #94a3b8; }
.aw-dict-prons { font-size: 12px; color: #64748b; }
.aw-dict-pron-tag { margin-inline-end: 6px; }
.aw-dict-pron-tag em { font-style: normal; font-size: 10px; color: #94a3b8; }

.aw-dict-forms { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.aw-dict-form-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 4px;
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
}
.aw-dict-form-tag em { font-style: normal; color: #94a3b8; font-size: 10px; }

.aw-dict-senses { display: flex; flex-direction: column; gap: 8px; }
.aw-dict-sense { display: flex; gap: 8px; }
.aw-dict-sense-num {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--aw-color, #2563EB); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.aw-dict-sense-body { flex: 1; min-width: 0; }
.aw-dict-def-txt { margin: 0 0 4px; color: #1e293b; font-weight: 500; }

.aw-dict-examples { margin: 4px 0; padding-inline-start: 14px; }
.aw-dict-example { color: #64748b; font-style: italic; font-size: 12px; }

.aw-dict-chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.aw-dict-label { font-size: 11px; font-weight: 700; color: #94a3b8; margin-inline-end: 2px; }
.aw-dict-chip { font-size: 11px; padding: 1px 8px; border-radius: 20px; cursor: default; }
.aw-dict-syn { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.aw-dict-ant { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.aw-dict-quote { margin: 6px 0 0; padding: 5px 10px; border-inline-start: 3px solid var(--aw-color, #2563EB); color: #475569; font-style: italic; font-size: 12px; }
.aw-dict-quote cite { font-style: normal; color: #94a3b8; font-size: 11px; }

.aw-dict-subsenses { margin: 4px 0 0; padding-inline-start: 14px; }
.aw-dict-subsense { font-size: 12px; color: #64748b; }

.aw-dict-source { margin-top: 10px; font-size: 11px; border-top: 1px solid #f0f4f8; padding-top: 6px; }
.aw-dict-source a { color: #94a3b8; text-decoration: none; }
.aw-dict-source a:hover { text-decoration: underline; }

/* ── Reading Mask ───────────────────────────────────────────────────────────── */
#aw-reading-mask-top,
#aw-reading-mask-bottom {
  position: fixed;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.65);
  pointer-events: none;
  z-index: 9999990;
  display: none;
}
body.aw-reading-mask-on #aw-reading-mask-top,
body.aw-reading-mask-on #aw-reading-mask-bottom { display: block; }

/* ── Reading Guide ──────────────────────────────────────────────────────────── */
#aw-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(255,255,0,.4);
  border-top: 2px solid rgba(0,0,0,.3);
  border-bottom: 2px solid rgba(0,0,0,.3);
  pointer-events: none;
  z-index: 9999991;
  display: none;
}
body.aw-reading-guide-on #aw-reading-guide { display: block; }

/* ── Text Magnifier ─────────────────────────────────────────────────────────── */
#aw-magnifier {
  position: fixed;
  z-index: 10000001;
  background: #fff;
  border: 2px solid var(--aw-color, #006CF2);
  border-radius: 10px;
  padding: 12px 16px;
  pointer-events: none;
  display: none;
  font-size: 22px !important;
  font-weight: 500;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  line-height: 1.5;
  color: #111;
  word-break: break-word;
}
/* Inner text element — clamps to 4 lines then adds … */
.aw-magnifier-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.aw-text-magnifier-on #aw-magnifier { display: block; }

/* ── Screen Reader word highlight ───────────────────────────────────────────── */
mark.aw-sr-word {
  background: #F9AE40;
  color: #002452;
  border-radius: 3px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* Red flash when user double-clicks to jump */
mark.aw-sr-word--jump {
  background: #DC2626;
  color: #fff;
}

/* ── Screen Reader notification ─────────────────────────────────────────────── */
.aw-sr-notif-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aw-sr-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.aw-sr-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--aw-color, #006CF2) 12%, white);
  color: var(--aw-color, #006CF2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.aw-sr-ctrl-btn:hover { background: color-mix(in srgb, var(--aw-color, #006CF2) 22%, white); }
.aw-sr-ctrl-btn:focus-visible { outline: 2px solid var(--aw-color, #006CF2); outline-offset: 2px; }
/* Prev/Next icons: black SVG tinted to brand blue via filter */
.aw-sr-ctrl-btn:not(.aw-sr-play-btn) .aw-asset-icon {
  filter: brightness(0) saturate(100%) invert(26%) sepia(99%) saturate(1680%) hue-rotate(202deg) brightness(97%);
}
.aw-sr-play-btn {
  width: 42px;
  height: 42px;
  background: var(--aw-color, #006CF2);
  color: #fff;
}
.aw-sr-play-btn:hover { background: color-mix(in srgb, var(--aw-color, #006CF2) 80%, black); }
/* Play/Pause icon: white on colored background */
.aw-sr-play-btn .aw-asset-icon { filter: brightness(0) invert(1); }
.aw-sr-speed-wrap {
  display: flex;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.aw-sr-speed-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.aw-sr-speed-btn.active {
  background: #fff;
  color: var(--aw-color, #006CF2);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.aw-sr-speed-btn:focus-visible { outline: 2px solid var(--aw-color, #006CF2); outline-offset: 1px; }

/* ── Notification Group ─────────────────────────────────────────────────────── */
.aw-notification-group {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%);
  width: 100%;
  max-width: 768px;
  z-index: 999999999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  pointer-events: none;
}

@media screen and (min-width: 768px) {
  .aw-notification-group {
    width: calc(100% - 300px);
    bottom: 25px;
  }
}

.aw-notification {
  border-radius: 15px;
  background: #F4F8FD;
  padding: 15px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .28);
  display: none;
  pointer-events: all;
}

.aw-notification.visible { display: block; }

/* ── Talk & Type Notification ────────────────────────────────────────────────── */
.aw-tt-notif-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aw-voice-mic-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--aw-color, #2563EB); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.aw-voice-mic-btn .aw-asset-icon { filter: brightness(0) invert(1); width: 22px; height: 22px; }
.aw-voice-mic-btn:hover { background: color-mix(in srgb, var(--aw-color, #2563EB) 80%, black); }
.aw-voice-mic-btn.recording { background: #dc2626; animation: aw-mic-pulse 1.2s infinite; }

@keyframes aw-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.aw-tt-notif-info { flex: 1; min-width: 0; }
.aw-tt-notif-title { display: block; font-size: 13px; font-weight: 700; color: #1e293b; }
.aw-tt-notif-msg { margin: 2px 0 0; font-size: 12px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.aw-tt-lang-select {
  padding: 5px 8px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  font-size: 12px; font-family: inherit; background: #f8fafc;
  color: #374151; cursor: pointer; outline: none; font-weight: 500; flex-shrink: 0;
}
.aw-tt-lang-select:focus { border-color: var(--aw-color, #2563EB); }

.aw-tt-close {
  background: color-mix(in srgb, var(--aw-color, #2563EB) 20%, white);
  border: none; font-size: 18px; cursor: pointer;
  color: var(--aw-color, #2563EB); padding: 8px; border-radius: 50%;
  line-height: 1; width: 34px; height: 34px; flex-shrink: 0;
}
.aw-tt-close:hover { color: #dc2626; background: #fee2e2; }

/* ── Virtual Keyboard ───────────────────────────────────────────────────────── */

#aw-virtual-keyboard {
  display: none;
  --aw-color: #2563EB;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#aw-virtual-keyboard.visible { display: block; }

.aw-vk-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0px;
}
.aw-kb-layout-select {
  padding: 5px 10px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  font-size: 12px; font-family: inherit; background: #f8fafc;
  color: #374151; cursor: pointer; outline: none; font-weight: 500;
}
.aw-kb-layout-select:focus { border-color: var(--aw-color, #2563EB); }
.aw-kb-close {
  background: color-mix(in srgb, var(--aw-color, #2563EB) 20%, white);
  border: none;
  font-size: 18px; cursor: pointer;
  color: var(--aw-color, #2563EB); padding: 8px; border-radius: 50%; line-height: 1;
  width: 34px;
  height: 34px;
}
.aw-kb-close:hover { color: #dc2626; background: #fee2e2; }

/* simple-keyboard theme */
.hg-theme-default {
  background: none!important; padding: 8px 10px 12px; border-radius: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.aw-sk-theme .hg-row { margin-bottom: 5px; }
.aw-sk-theme .hg-button {
  background: #fff; border: none; border-radius: 5px;
  box-shadow: 0 2px 0 #9aa0a6; color: #111;
  font-size: 13px; height: 42px; cursor: pointer;
  font-family: inherit; font-weight: 500;
}
.aw-sk-theme .hg-button:active { box-shadow: none; transform: translateY(1px); }
.aw-sk-theme .hg-button:hover { background: #e8f0fe; }
.aw-sk-theme .hg-button.aw-sk-fn {
  background: #d0d5dd; color: #374151; font-size: 15px;
}
.aw-sk-theme .hg-button.aw-sk-fn:hover { background: #bcc0c8; }
.aw-sk-theme .hg-button.hg-activeButton {
  background: var(--aw-color, #2563EB); color: #fff; box-shadow: 0 2px 0 #1a4ab0;
}

/* Controller keyboard (arrow keys) */
.aw-sk-ctrl-theme.hg-theme-default {
  background: #d0d5dd; padding: 6px 10px 8px; border-radius: 0;
  border-top: 1px solid #bcc0c8;
}
.aw-sk-ctrl-theme .hg-row { justify-content: center; }
.aw-sk-ctrl-theme .hg-button {
  background: #fff; border: none; border-radius: 5px;
  height: 38px; max-width: 42px; font-size: 16px;
  box-shadow: 0 2px 0 #bcc0c8; cursor: pointer;
}
.aw-sk-ctrl-theme .hg-button:active { box-shadow: none; transform: translateY(1px); }
.aw-sk-ctrl-theme .hg-button:hover  { background: #e8f0fe; }

.simple-keyboard.simple-keyboard-controller.hg-theme-default {
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: column;
  background-color: transparent;
  padding:10px 0;
  margin-top: 5px;
  border-top: 1px solid #cdcdcd;
  border-radius: 0px;
}

.simple-keyboard.simple-keyboard-controller.hg-theme-default .hg-button {
  flex-grow: 0;
  min-width: 50px;
  min-height: 50px;
}

.simple-keyboard.simple-keyboard-controller.hg-theme-default
.hg-button.hg-functionBtn.hg-button-enter {
  width: 160px;
}

@media (max-width: 480px) {
  .simple-keyboard.simple-keyboard-controller.hg-theme-default
  .hg-button.hg-functionBtn.hg-button-enter {
    width: 70px;
  }
}

.simple-keyboard-controller.aw-ctrl-theme .hg-row {
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}

.simple-keyboard-controller.aw-ctrl-theme .hg-row:first-child .hg-button {
  margin: 0 auto;
}

/* ── Color Blindness SVG Filter ─────────────────────────────────────────────── */
#aw-cb-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* =============================================================================
   ACCESSIBILITY STATE OVERRIDES — applied via body class
   ============================================================================= */

/* High Contrast */
html.aw-high-contrast { filter: contrast(1.4) brightness(1.05) !important; }
html.aw-high-contrast a,
html.aw-high-contrast button,
html.aw-high-contrast input,
html.aw-high-contrast select,
html.aw-high-contrast textarea {
  outline: 2px solid currentColor !important;
}

/* Dark Contrast */
body.aw-dark-contrast,
body.aw-dark-contrast div,
body.aw-dark-contrast main,
body.aw-dark-contrast article,
body.aw-dark-contrast section,
body.aw-dark-contrast aside,
body.aw-dark-contrast header,
body.aw-dark-contrast footer,
body.aw-dark-contrast nav {
  background-color: #121212 !important;
  color: #f0f0f0 !important;
}
body.aw-dark-contrast a { color: #90caf9 !important; }
body.aw-dark-contrast input,
body.aw-dark-contrast select,
body.aw-dark-contrast textarea {
  background-color: #1e1e1e !important;
  color: #f0f0f0 !important;
  border-color: #555 !important;
}

/* Light Contrast */
html.aw-light-contrast { filter: brightness(1.15) contrast(0.9) !important; }

/* Smart Contrast — ensures minimum 4.5:1 ratio feel */
html.aw-smart-contrast { filter: contrast(1.2) !important; }
html.aw-smart-contrast * { text-shadow: none !important; }

/* Monochrome */
html.aw-monochrome { filter: grayscale(100%) !important; }

/* Invert Colors */
html.aw-invert-colors { filter: invert(1) hue-rotate(180deg) !important; }
html.aw-invert-colors img,
html.aw-invert-colors video,
html.aw-invert-colors canvas,
html.aw-invert-colors picture { filter: invert(1) hue-rotate(180deg) !important; }

/* High Saturation */
html.aw-high-saturation { filter: saturate(2.5) !important; }

/* Low Saturation */
html.aw-low-saturation { filter: saturate(0.3) !important; }

/* Blue Light Filter overlay */
body.aw-blue-light::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 140, 30, 0.18);
  pointer-events: none;
  z-index: 9999995;
}

/* Dyslexia Font */
body.aw-dyslexia-font,
body.aw-dyslexia-font :not(i):not([class*="icon"]):not([class^="icon"]) {
  font-family: 'OpenDyslexic', 'Comic Sans', 'Chalkboard SE', 'Bradley Hand', cursive !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
}

/* Readable Font */
body.aw-readable-font,
body.aw-readable-font :not(i):not([class*="icon"]):not([class^="icon"])  {
  font-family: Arial, Helvetica, 'Liberation Sans', sans-serif !important;
}

/* Highlight Links */
body.aw-highlight-links a,
body.aw-highlight-links [role="link"] {
  background-color: #ffe082 !important;
  color: #000 !important;
  outline: 2px solid #f57f17 !important;
  outline-offset: 2px !important;
  border-radius: 2px !important;
  text-decoration: underline !important;
}

/* Highlight Titles */
body.aw-highlight-titles h1,
body.aw-highlight-titles h2,
body.aw-highlight-titles h3,
body.aw-highlight-titles h4,
body.aw-highlight-titles h5,
body.aw-highlight-titles h6 {
  outline: 2px solid #1565c0 !important;
  outline-offset: 3px !important;
  border-radius: 2px !important;
}

/* ── Skip Links ─────────────────────────────────────────────────────────── */
#aw-skip-links {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999998;
  display: flex;
  gap: 4px;
  padding: 4px;
}
.aw-kbnav-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: #005fcc;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.aw-kbnav-skip-link:focus {
  position: static;
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
}

/* ── Keyboard Navigation Legend ─────────────────────────────────────────── */
#aw-kb-legend {
  position: fixed;
  z-index: 999999;
  width: 240px;
  max-width: calc(100vw - 24px);
  border-radius: 15px;
  background: #F4F8FD;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .28);
  font-family: sans-serif;
  font-size: 12px;
  overflow: hidden;
  user-select: none;
  pointer-events: all;
  transition: opacity 0.2s ease;
}
#aw-kb-legend.aw-kb-hidden { opacity: 0; pointer-events: none; }
.aw-kb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #012e5d;
}
.aw-kb-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
#aw-kb-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 5px;
}
#aw-kb-close:hover { background: rgba(255,255,255,.28); }
.aw-kb-body { padding: 10px 14px 14px; }
.aw-kb-section { margin-bottom: 10px; }
.aw-kb-section:last-child { margin-bottom: 0; }
.aw-kb-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #64748b;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.aw-kb-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 3px 5px;
  border-radius: 5px;
  margin-bottom: 1px;
}
.aw-kb-row.aw-kb-cat--active {
  background: rgba(1, 46, 93, 0.1);
}
.aw-kb-row kbd {
  display: inline-block;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: monospace;
  color: #012e5d;
  font-weight: 700;
  white-space: nowrap;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.aw-kb-row span {
  color: #334155;
  font-size: 11px;
  line-height: 1.3;
}
.aw-kb-hl {
  outline: 2px solid #012e5d !important;
  outline-offset: 3px !important;
  background: rgba(1, 46, 93, 0.08) !important;
  border-radius: 3px;
  transition: outline 0.15s ease, background 0.15s ease;
}

/* Hide Images */
body.aw-hide-images img,
body.aw-hide-images picture,
body.aw-hide-images svg:not(.aw-icon-svg),
body.aw-hide-images figure { visibility: hidden !important; }

/* Image Descriptions — fixed tooltip (escapes overflow:hidden, no image resize) */
#aw-img-tip {
  position: fixed;
  background-color: #333;
  border-radius: 4px;
  box-shadow: 0px 2px 4px #07172258;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.35em;
  padding: 0.5em 0.7em;
  text-align: center;
  max-width: 7rem;
  word-break: break-word;
  z-index: 99999;
  pointer-events: none;
  transform: translateX(-50%) translateY(calc(-100% - 0.6em));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
#aw-img-tip.aw-img-tip--on {
  opacity: 1;
  visibility: visible;
}
#aw-img-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0.6em 0.8em 0;
  border-style: solid;
  border-color: transparent;
  border-top-color: #333;
}

/* Stop Animations — html prefix raises specificity above theme !important overrides */
html body.aw-stop-animations *,
html body.aw-stop-animations *:hover,
html body.aw-stop-animations *:focus,
html body.aw-stop-animations *:focus-visible,
html body.aw-stop-animations *:focus-within,
html body.aw-stop-animations *:active,
html body.aw-stop-animations *::before,
html body.aw-stop-animations *::after {
  animation-play-state: paused !important;
  -webkit-animation-play-state: paused !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* ── Page Navigation Popup (Filter Content) ─────────────────────────────── */
#aw-pagenav-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999990;
  width: 500px;
  max-width: calc(100vw - 24px);
  max-height: 82vh;
  flex-direction: column;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 15px;
  background: #F4F8FD;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .28);
  display: none;
  pointer-events: all;
}
.aw-pn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.aw-pn-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #1e293b;
}
.aw-pn-tabs {
  margin-bottom: 12px;
  flex-shrink: 0;
}
.aw-pn-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.aw-pn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 8px;
  background: none;
  border: none;
  width: 100%;
  text-align: start;
  color: #006CF2;
  font-size: 13px;
  font-family: inherit;
}
.aw-pn-item:hover { background: rgba(0,108,242,.08); }
.aw-pn-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #002452;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
}
.aw-pn-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: start;
  display: block; font-size: 13px; font-weight: 700; color: #1e293b;
}
.aw-pn-empty {
  color: #888;
  font-size: 13px;
  padding: 12px 6px;
}

/* Highlight Focus */
body.aw-highlight-focus *:focus,
body.aw-highlight-focus *:focus-visible {
  outline: 3px solid #ff6f00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(255,111,0,.25) !important;
}

/* Highlight Hover */
body.aw-highlight-hover *:hover {
  outline: 2px solid #1976d2 !important;
  outline-offset: 2px !important;
}

/* ── Read Mode ───────────────────────────────────────────────────────────────── */
body.aw-read-mode > *:not(#aw-panel):not(.aw-trigger):not(#aw-notif-group):not(.aw-skip-links):not(#aw-virtual-keyboard):not(#aw-reading-mask-top):not(#aw-reading-mask-bottom):not(#aw-reading-guide):not(#aw-magnifier):not(#aw-cb-filters):not(#aw-read-mode-content):not(style) {
  display: none !important;
}
body.aw-read-mode #aw-panel:not([hidden])  { display: flex !important; }
body.aw-read-mode .aw-trigger { display: flex !important; }

#aw-read-mode-content { display: none; }
body.aw-read-mode #aw-read-mode-content {
  display: flex !important;
  flex-direction: column;
  position: fixed; inset: 0;
  z-index: 99999999;
  font-family: inherit;
  overflow: hidden;
}

/* Themes — CSS vars */
#aw-read-mode-content                              { --rm-bg:#fff;    --rm-text:#1a1a1a; --rm-border:#e2e8f0; --rm-toolbar:#f8fafc; --rm-toolbar-text:#374151; --rm-accent:var(--aw-color, #2563eb);; --rm-hl:#dbeafe; --rm-ff: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
#aw-read-mode-content[data-rm-theme="light"]       { --rm-bg:#f9fafb;  --rm-text:#111827; --rm-border:#e5e7eb; --rm-toolbar:#fff;    --rm-toolbar-text:#374151; --rm-accent:#2563eb; --rm-hl:#dbeafe; }
#aw-read-mode-content[data-rm-theme="dark"]        { --rm-bg:#1e1e2e;  --rm-text:#e2e8f0; --rm-border:#374151; --rm-toolbar:#0f172a; --rm-toolbar-text:#e2e8f0; --rm-accent:#60a5fa; --rm-hl:#1e3a5f; }
#aw-read-mode-content[data-rm-theme="yellow"]      { --rm-bg:#fffde7;  --rm-text:#1a1200; --rm-border:#f0e060; --rm-toolbar:#fff9c4; --rm-toolbar-text:#1a1200; --rm-accent:#b45309; --rm-hl:#fef08a; }
#aw-read-mode-content[data-rm-theme="blue"]        { --rm-bg:#eff6ff;  --rm-text:#1e3a5f; --rm-border:#bfdbfe; --rm-toolbar:#dbeafe; --rm-toolbar-text:#1e3a5f; --rm-accent:#2563eb; --rm-hl:#bfdbfe; }
#aw-read-mode-content[data-rm-theme="highContrast"]{ --rm-bg:#fff;     --rm-text:#000;    --rm-border:#000;    --rm-toolbar:#ffff00; --rm-toolbar-text:#000;    --rm-accent:#000;    --rm-hl:#ffff00; }
#aw-read-mode-content[data-rm-theme="darkContrast"]{ --rm-bg:#000;     --rm-text:#fff;    --rm-border:#fff;    --rm-toolbar:#111;    --rm-toolbar-text:#fff;    --rm-accent:#ffff00; --rm-hl:#333300; }

/* Font families */
#aw-read-mode-content[data-rm-font="serif"]     { --rm-ff: Georgia,'Times New Roman',serif; }
#aw-read-mode-content[data-rm-font="dyslexic"]  { --rm-ff: 'OpenDyslexic',Arial,sans-serif; }
#aw-read-mode-content[data-rm-font="system"]    { --rm-ff: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }

/* Toolbar */
.aw-rm-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; height: 46px; flex-shrink: 0;
  background: var(--rm-toolbar); color: var(--rm-toolbar-text);
  border-bottom: 1px solid var(--rm-border);
  gap: 8px; position: relative; z-index: 10;
}
.aw-rm-toolbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; flex: 1; }
.aw-rm-toolbar-right { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.aw-rm-label { font-weight: 700; font-size: 13px; color: var(--rm-accent); white-space: nowrap; flex-shrink: 0; }
.aw-rm-title-sep { font-size: 13px; color: var(--rm-toolbar-text); opacity: .35; flex-shrink: 0; }
.aw-rm-page-title { font-size: 12px; color: var(--rm-toolbar-text); opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-rm-group { display: flex; align-items: center; }
.aw-rm-sep { display: inline-block; width: 1px; height: 18px; background: var(--rm-border); margin: 0 8px; flex-shrink: 0; }

/* All toolbar buttons: text-link style, no borders */
.aw-rm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--rm-accent); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 4px 7px; border-radius: 4px; line-height: 1; white-space: nowrap;
  transition: opacity .12s, background .12s;
}
.aw-rm-btn:hover { opacity: .75; background: var(--rm-hl); }
.aw-rm-btn:disabled { opacity: .3; cursor: not-allowed; }
.aw-rm-close-btn { color: var(--rm-toolbar-text); font-size: 16px; padding: 4px 8px; }
.aw-rm-close-btn:hover { color: #dc2626; background: #fee2e2; opacity: 1; }

/* Popups */
.aw-rm-popup {
  position: absolute; top: 48px; right: 8px; z-index: 9999999;
  background: var(--rm-bg); border: 1px solid var(--rm-border);
  border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.13); padding: 6px;
}
.aw-rm-speed-popup { display: flex; flex-direction: column; gap: 1px; min-width: 80px; }
.aw-rm-speed-opt {
  width: 100%; text-align: center; padding: 7px 12px; border: none; border-radius: 5px;
  background: transparent; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--rm-text); font-family: inherit;
}
.aw-rm-speed-opt:hover { background: var(--rm-hl); color: var(--rm-accent); }
.aw-rm-speed-opt.active { color: var(--rm-accent); font-weight: 700; }

.aw-rm-settings-popup { min-width: 270px; display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.aw-rm-set-group { display: flex; flex-direction: column; gap: 6px; }
.aw-rm-set-label { font-size: 10px; font-weight: 700; color: var(--rm-toolbar-text); opacity: .5; text-transform: uppercase; letter-spacing: .07em; }
.aw-rm-set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aw-rm-toggle-row .aw-rm-set-label { opacity: .85; font-size: 12px; text-transform: none; font-weight: 500; }
.aw-rm-theme-row { display: flex; flex-wrap: wrap; gap: 4px; }
.aw-rm-theme-btn {
  padding: 4px 10px; border: none; border-radius: 4px;
  background: transparent; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--rm-accent); font-family: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.aw-rm-theme-btn:hover { opacity: .7; }
.aw-rm-theme-btn.active { background: var(--rm-accent); color: #fff; text-decoration: none; border-radius: 4px; }
.aw-rm-select {
  flex: 1; padding: 5px 8px; border: 1px solid var(--rm-border); border-radius: 6px;
  background: var(--rm-bg); color: var(--rm-text); font-size: 12px; font-family: inherit; outline: none;
}
.aw-rm-stepper { display: flex; align-items: center; gap: 2px; }
.aw-rm-step-btn {
  background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 700;
  color: var(--rm-accent); padding: 2px 6px; font-family: inherit; line-height: 1; border-radius: 3px;
}
.aw-rm-step-btn:disabled { opacity: .3; cursor: not-allowed; }
.aw-rm-step-btn:not(:disabled):hover { background: var(--rm-hl); }
.aw-rm-step-val { font-size: 12px; font-weight: 700; min-width: 20px; text-align: center; color: var(--rm-text); }
.aw-rm-toggle {
  width: 36px; height: 20px; border-radius: 20px; border: none; cursor: pointer;
  background: #cbd5e1; position: relative; flex-shrink: 0; transition: background .15s;
}
.aw-rm-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s;
}
.aw-rm-toggle.active { background: var(--rm-accent); }
.aw-rm-toggle.active::after { left: 19px; }
#aw-read-mode-content[dir="rtl"] .aw-rm-toggle::after { left: auto; right: 3px; }
#aw-read-mode-content[dir="rtl"] .aw-rm-toggle.active::after { left: auto; right: 19px; }

/* Layout */
.aw-rm-layout {
  display: flex; flex: 1; overflow: hidden;
  background: var(--rm-bg); color: var(--rm-text);
  font-family: var(--rm-ff); font-size: var(--rm-fs, 1em);
  line-height: var(--rm-lh, 1.8); letter-spacing: var(--rm-ls, normal); word-spacing: var(--rm-ws, normal);
}

/* TOC */
.aw-rm-toc {
  width: 220px; flex-shrink: 0; border-right: 1.5px solid var(--rm-border);
  overflow-y: auto; padding: 16px 0;
}
.aw-rm-toc-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 6px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--rm-text);
  opacity: .5; cursor: default; user-select: none;
}
.aw-rm-toc-list { list-style: none; margin: 0; padding: 0; }
.aw-rm-toc-h1 { padding-left: 12px; }
.aw-rm-toc-h2 { padding-left: 24px; }
.aw-rm-toc-h3 { padding-left: 36px; }
#aw-read-mode-content[dir="rtl"] .aw-rm-toc-h1 { padding-left: 0; padding-right: 12px; }
#aw-read-mode-content[dir="rtl"] .aw-rm-toc-h2 { padding-left: 0; padding-right: 24px; }
#aw-read-mode-content[dir="rtl"] .aw-rm-toc-h3 { padding-left: 0; padding-right: 36px; }
.aw-rm-toc-link {
  display: block; padding: 5px 16px; font-size: 12px;
  color: var(--rm-accent); cursor: pointer; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.aw-rm-toc-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Content */
.aw-rm-content {
  flex: 1; overflow-y: auto; padding: 32px 48px;
}
.aw-rm-content * {
  background: transparent !important; border-color: var(--rm-border) !important;
  color: var(--rm-text) !important; font-family: var(--rm-ff) !important;
  box-shadow: none !important; max-width: 100% !important;
}
.aw-rm-content h1, .aw-rm-content h2, .aw-rm-content h3,
.aw-rm-content h4, .aw-rm-content h5, .aw-rm-content h6 { font-weight: 700; margin: 1.2em 0 .5em; }
.aw-rm-content h1 { font-size: 1.8em; }
.aw-rm-content h2 { font-size: 1.5em; }
.aw-rm-content h3 { font-size: 1.25em; }
.aw-rm-content p, .aw-rm-content li { margin-bottom: .6em; }
.aw-rm-content a { color: var(--rm-accent) !important; }
.aw-rm-content img { max-width: 100%; height: auto; border-radius: 6px; }
.aw-rm-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.aw-rm-content td, .aw-rm-content th { border: 1px solid var(--rm-border) !important; padding: 8px 12px; }
.aw-rm-ext-link { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--rm-accent) !important; border-radius: 8px; color: var(--rm-accent) !important; font-size: 13px; text-decoration: none; margin: 8px 0; }
.aw-rm-reading { background: var(--rm-hl) !important; border-radius: 4px; outline: 2px solid var(--rm-accent); outline-offset: 2px; }
#aw-read-mode-content.aw-rm-hide-links .aw-rm-content a { display: none !important; }
#aw-read-mode-content.aw-rm-hide-images .aw-rm-content img { display: none !important; }
.aw-rm-content > * > nav,
.aw-rm-content > * > aside,
.aw-rm-content > * > footer,
.aw-rm-content > * > header { display: none !important; }

/* Mobile: TOC collapsible */
@media (max-width: 600px) {
  .aw-rm-layout { flex-direction: column; }
  .aw-rm-toc { width: 100%; border-right: none; border-bottom: 1.5px solid var(--rm-border); padding: 0; }
  .aw-rm-toc-hdr { cursor: pointer; opacity: 1; font-size: 12px; }
  .aw-rm-toc-hdr svg { transition: transform .2s; }
  .aw-rm-toc-hdr.open svg { transform: rotate(180deg); }
  .aw-rm-toc-list { display: none; max-height: 200px; overflow-y: auto; }
  .aw-rm-toc-list.open { display: block; }
  .aw-rm-content { padding: 16px 20px; }
  .aw-rm-toolbar { padding: 0 10px; gap: 6px; }
  .aw-rm-toolbar-left { display: none; }
  .aw-rm-popup { right: 8px; }
  .aw-rm-settings-popup { min-width: calc(100vw - 32px); right: 8px; }
}

/* Text Alignment — excluded from the widget's own panel so re-aligning page
   content can't also re-align (and visually break) the panel's own dropdowns. */
body.aw-align-left :not(#aw-panel):not(#aw-panel *)  { text-align: left  !important; }
body.aw-align-center :not(#aw-panel):not(#aw-panel *) { text-align: center !important; }
body.aw-align-right :not(#aw-panel):not(#aw-panel *) { text-align: right !important; }

/* Cursor — Big Black */
body.aw-cursor-black,
body.aw-cursor-black * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4l36 20-16 2-8 16z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 6 4, auto !important;
}

/* Cursor — Big White */
body.aw-cursor-white,
body.aw-cursor-white * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4l36 20-16 2-8 16z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 6 4, auto !important;
}

/* Cursor — Slow */
body.aw-cursor-slow,
body.aw-cursor-slow * { cursor: none !important; }
#aw-slow-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  pointer-events: none;
  z-index: 2147483647;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  will-change: transform;
}

/* Color Blindness filter application */
body.aw-color-blind { filter: url(#aw-cb-active) !important; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Profile info button: 22px is below the ~24-44px touch-target guidance,
     hard to hit precisely on a touchscreen sitting on top of a larger
     tappable card. Enlarge it for tablet/phone. */
  .aw-profile-info-btn { width: 30px; height: 30px; font-size: 15px; }

  /* Notification cards (Talk & Type, Voice Navigation, etc.) pack a mic
     button, text, a language <select> and close/toggle buttons into one
     unwrapped flex row — on a narrow viewport that overflows the card
     instead of shrinking. Let it wrap and cap the select's width. */
  .aw-tt-notif-inner { flex-wrap: wrap; row-gap: 8px; }
  .aw-tt-lang-select { max-width: 45vw; }
  .aw-notification-group { padding: 8px; gap: 6px; }
  .aw-notification { padding: 12px; }
}

@media (max-width: 480px) {
  /* Text Magnifier: shrink the type size a bit on phones so the fixed
     4-line clamp still shows a useful amount of text within the narrower
     max-width instead of truncating almost immediately. */
  #aw-magnifier { font-size: 18px !important; padding: 10px 12px; }

  .aw-tt-notif-inner { gap: 8px; }
  .aw-tt-lang-select { max-width: 100%; flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .aw-panel { width: calc(100vw - 24px); right: 12px; left: 12px; }
  .aw-panel.aw-oversize { width: calc(100vw - 24px); }
}

/* ── RTL / Arabic Support ───────────────────────────────────────────────────── */
.aw-panel[dir="rtl"] {
  direction: rtl;
  text-align: right;
  /* Arabic-friendly system font stack */
  font-family: 'Segoe UI', Tahoma, 'Arabic Typesetting', 'Traditional Arabic',
               'Simplified Arabic', Arial, sans-serif;
}
.aw-panel[dir="rtl"] .aw-footer-reset { flex-direction: row-reverse; }
.aw-panel[dir="rtl"] .aw-panel-close { right: auto; left: 14px; }
.aw-panel[dir="rtl"] .aw-panel-header-inner { padding-left: 44px; padding-right: 0px; }
.aw-panel[dir="rtl"] .aw-header-b-right { align-items: flex-start; }

/* RTL: flip panel side so it opens on the correct side. Keyed off the panel's
   own [dir] (set in JS from the widget's selected UI language, falling back
   to the host page's direction — see _buildPanel/_rebuildPanel) rather than
   only the host page's dir, so picking an RTL widget language on an LTR page
   still opens the panel on the correct side for its now-mirrored content. */
.aw-panel[dir="rtl"][data-position="bottom-right"],
.aw-panel[dir="rtl"][data-position="top-right"],
.aw-panel[dir="rtl"][data-position="middle-right"] {
  right: auto;
  left: 0px;
}
.aw-panel[dir="rtl"][data-position="bottom-left"],
.aw-panel[dir="rtl"][data-position="top-left"],
.aw-panel[dir="rtl"][data-position="middle-left"] {
  left: auto;
  right: 0px;
}
html[dir="rtl"] .aw-trigger[data-position="bottom-right"] { right: auto; left: 16px; }
html[dir="rtl"] .aw-trigger[data-position="top-right"]    { right: auto; left: 16px; }
html[dir="rtl"] .aw-trigger[data-position="middle-right"] { right: auto; left: 16px; }
html[dir="rtl"] .aw-trigger[data-position="bottom-left"]  { left: auto; right: 16px; }
html[dir="rtl"] .aw-trigger[data-position="top-left"]     { left: auto; right: 16px; }

.aw-panel[dir="rtl"] .aw-section-label { text-align: right; }
/* Arabic body text alignment in read mode */
body.aw-read-mode #aw-read-mode-content[dir="rtl"] {
  font-family: 'Arabic Typesetting', 'Traditional Arabic', 'Simplified Arabic',
               Georgia, serif;
  text-align: right;
}

/* External trigger active state (e.g. govbh) */
/*[data-aw-toggle][aria-expanded="true"],*/
/*.aw-external-toggle[aria-expanded="true"] {*/
/*  outline: 3px solid currentColor;*/
/*  outline-offset: 2px;*/
/*}*/

/* ── Voice Navigation Notification ──────────────────────────────────────────── */
/* Uses .aw-notification card from the group — no fixed positioning needed */
.aw-vn-notif { flex-direction: column; padding: 0; overflow: hidden; }
.aw-vn-notif .aw-tt-notif-inner {
  padding: 15px;
}
.aw-vn-notif .aw-voice-mic-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--aw-color, #1565c0);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s, box-shadow .2s;
}
.aw-vn-notif .aw-voice-mic-btn:hover { background: color-mix(in srgb, var(--aw-color, #1565c0) 80%, black); }
.aw-vn-notif .aw-voice-mic-btn:focus { outline: 3px solid var(--aw-color, #1565c0); outline-offset: 2px; }
.aw-vn-notif .aw-voice-mic-btn.aw-voice-listening {
  background: color-mix(in srgb, var(--aw-color, #1565c0) 80%, black);
  animation: aw-vn-mic-pulse 1.4s ease-in-out infinite;
}
@keyframes aw-vn-mic-pulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--aw-color, #1565c0) 50%, transparent); }
  60%     { box-shadow: 0 0 0 12px transparent; }
}

.aw-vn-toggle {
  background: color-mix(in srgb, var(--aw-color, #2563EB) 20%, white);
  border: none; font-size: 18px; cursor: pointer;
  color: var(--aw-color, #2563EB); padding: 8px; border-radius: 50%;
  line-height: 1; width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.aw-vn-toggle:hover { color: #dc2626; background: #fee2e2; }

.aw-voice-body {
  max-height: 260px;
  overflow-y: auto;
  background: transparent;
  border-top: 1px solid #e2e8f0;
}
.aw-vn-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f4f8;
}
.aw-vn-search {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  background: #f8fafc;
  color: #1e293b;
}
.aw-vn-search:focus { border-color: var(--aw-color, #1565c0); background: #fff; }

.aw-vcmd-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f4f8;
  gap: 12px;
}
[dir="rtl"] .aw-vcmd-row { flex-direction: row-reverse; }
.aw-vcmd-row[hidden] { display: none; }

.aw-vcmd-name { font-size: 13px; font-weight: 700; color: #1e293b; white-space: nowrap; flex-shrink: 0; min-width: 120px; }
.aw-vcmd-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-vcmd-pill {
  padding: 3px 10px;
  border: 1.5px solid var(--aw-color, #1565c0);
  border-radius: 20px;
  font-size: 12px;
  color: var(--aw-color, #1565c0);
  background: transparent;
  white-space: nowrap;
  cursor: default;
}

/* Listening state: status text uses widget color */
.aw-voice-mic-btn.aw-voice-listening ~ .aw-tt-notif-info .aw-tt-notif-msg { color: var(--aw-color, #1565c0); font-weight: 700; }

/* ── Profile wrap & info button ─────────────────────────────────────────── */
.aw-profile-wrap {
  position: relative;
  display: block;
}
.aw-profile-wrap .aw-profile-btn {
  width: 100%;
}
.aw-profile-info-btn {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--aw-color, #2563EB);
  background: rgba(255,255,255,0.95);
  color: var(--aw-color, #2563EB);
  font-size: 13px;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background 0.15s, color 0.15s;
}
[dir="rtl"] .aw-profile-info-btn { right: 5px; left: auto; }
.aw-profile-info-btn:hover {
  background: var(--aw-color, #2563EB);
  color: #fff;
}
.aw-profile-info-btn:focus-visible {
  outline: 2px solid var(--aw-color, #2563EB);
  outline-offset: 2px;
}

/* ── Profile info popup ──────────────────────────────────────────────────── */
.aw-profile-info-popup {
  position: fixed;
  z-index: 2147483647;
  width: 280px;
  max-width: calc(100vw - 24px);
  background: #C6C6C6FF;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgb(230 230 230 / 0.22);
  padding: 12px 14px 13px;
  pointer-events: auto;
  transition: opacity 0.12s;
}
.aw-profile-info-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 16px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #C6C6C6FF;;
}
[dir="rtl"] .aw-profile-info-popup { text-align: right; }
[dir="rtl"] .aw-profile-info-popup::before { left: auto; right: 16px; }
.aw-profile-info-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--aw-color, #1e293b);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aw-profile-info-desc {
  font-size: 12.5px;
  color: #000000;
  line-height: 1.55;
}

/* ── Selected profile bar ────────────────────────────────────────────────── */
.aw-selected-profile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 13px;
  background: color-mix(in srgb, var(--aw-color, #2563EB) 10%, transparent);
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
}

.aw-sel-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--aw-color, #2563EB);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.aw-sel-val {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aw-sel-profile-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
}
.aw-sel-profile-name img,
.aw-sel-profile-name svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.aw-sel-profile-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

/* ── Content Scale Bar Picker ───────────────────────────────────────────────── */
.aw-cs-row {
  align-items: center;
}
.aw-cs-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
}
.aw-cs-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.aw-cs-step-btn:hover:not(:disabled) {
  background: var(--aw-color, #2563EB);
  border-color: var(--aw-color, #2563EB);
  color: #fff;
}
.aw-cs-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.aw-cs-step-btn:focus-visible {
  outline: 2px solid var(--aw-color, #2563EB);
  outline-offset: 2px;
}
.aw-cs-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  flex: 1 1 0;
  width: 100%;
}
.aw-cs-bar {
  flex: 1;
  min-width: 0;
  border-radius: 4px 4px 2px 2px;
  background: #E2E8F0;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, height 0.15s;
}
/* Staircase heights — bottom-aligned via flex-end on parent */
.aw-cs-bar:nth-child(1) { height: 28%; }
.aw-cs-bar:nth-child(2) { height: 50%; }
.aw-cs-bar:nth-child(3) { height: 68%; flex: 1.5; }
.aw-cs-bar:nth-child(4) { height: 84%; }
.aw-cs-bar:nth-child(5) { height: 100%; }
.aw-cs-bar.active {
  background: var(--aw-color, #2563EB);
}
.aw-cs-bar:hover:not(.active) {
  background: color-mix(in srgb, var(--aw-color, #2563EB) 45%, #E2E8F0);
}
.aw-cs-bar:focus-visible {
  outline: 2px solid var(--aw-color, #2563EB);
  outline-offset: 2px;
}

/* ── Button Style section ────────────────────────────────────────────────── */
.aw-btn-icon-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.aw-btn-icon-opt {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, transform .15s;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  flex-shrink: 0;
}
.aw-btn-icon-opt.aw-btn-icon-rect { border-radius: 14px; }
.aw-btn-icon-opt:hover { transform: scale(1.08); }
.aw-btn-icon-opt.active {
  border: 3px solid var(--aw-color, #2563EB) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aw-color, #2563EB) 30%, transparent);
}
.aw-btn-icon-opt-img { width: 28px; height: 28px; object-fit: contain; pointer-events: none; }

/* Position screen picker */
.aw-pos-screen {
  position: relative;
  width: 100%;
  height: 68px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 10px;
  direction: ltr;
}
.aw-pos-dot {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  padding: 0;
}
.aw-pos-dot::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  display: block;
}
.aw-pos-dot:hover { border-color: var(--aw-color, #2563EB); }
.aw-pos-dot:hover::after { background: var(--aw-color, #2563EB); }
.aw-pos-dot.active { border-color: var(--aw-color, #2563EB); background: color-mix(in srgb, var(--aw-color, #2563EB) 10%, white); }
.aw-pos-dot.active::after { background: var(--aw-color, #2563EB); }
.aw-pos-dot:focus-visible { outline: 2px solid var(--aw-color, #2563EB); outline-offset: 2px; }
