/* =========================================================
   EMMA•MED Core 1.7.7 — Accessibility / visually impaired mode
   ========================================================= */

.emma-a11y,
.emma-a11y *{box-sizing:border-box}

.emma-a11y{
  --a11y-teal:#008289;
  --a11y-navy:#102a4c;
  --a11y-border:#cbd9dc;
  --a11y-bg:#fff;
  --a11y-text:#102a4c;
  position:relative;
  z-index:999999;
  font-family:Inter,Arial,sans-serif;
}

.emma-a11y__launcher{
  position:fixed;
  right:20px;
  bottom:20px;
  min-height:48px;
  padding:0 17px;
  display:flex;
  align-items:center;
  gap:9px;
  border:2px solid var(--a11y-teal);
  border-radius:999px;
  background:#fff;
  color:var(--a11y-navy);
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(16,42,76,.16);
}

.emma-a11y__launcher:hover,
.emma-a11y__launcher:focus-visible{
  background:#eef8f8;
  outline:3px solid rgba(0,130,137,.25);
  outline-offset:2px;
}

.emma-a11y__eye{
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:var(--a11y-teal);
  border-radius:50%;
  font-size:14px;
}

.emma-a11y__panel{
  position:fixed;
  right:20px;
  bottom:80px;
  width:min(420px,calc(100vw - 30px));
  max-height:calc(100vh - 110px);
  overflow:auto;
  padding:20px;
  border:2px solid var(--a11y-border);
  border-radius:16px;
  background:#fff;
  color:var(--a11y-text);
  box-shadow:0 18px 50px rgba(16,42,76,.22);
}

.emma-a11y__panel[hidden]{display:none!important}

.emma-a11y__panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding-bottom:14px;
  border-bottom:1px solid #dfe7e9;
}

.emma-a11y__panel-head strong{
  color:#102a4c;
  font-size:19px;
  line-height:1.3;
}

.emma-a11y__close{
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cbd9dc;
  border-radius:8px;
  background:#fff;
  color:#102a4c;
  font-size:24px;
  cursor:pointer;
}

.emma-a11y__section{
  padding:16px 0;
  border-bottom:1px solid #e6edef;
}

.emma-a11y__label{
  display:block;
  margin-bottom:10px;
  color:#102a4c;
  font-size:14px;
  font-weight:800;
}

.emma-a11y__controls{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.emma-a11y__controls button{
  min-width:64px;
  min-height:42px;
  padding:0 13px;
  border:2px solid #cbd9dc;
  border-radius:8px;
  background:#fff;
  color:#102a4c;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
}

.emma-a11y__controls button.is-active{
  color:#fff;
  background:#008289;
  border-color:#008289;
}

.emma-a11y__schemes button[data-a11y-theme="bw"]{
  color:#000;
  background:#fff;
  border-color:#000;
}
.emma-a11y__schemes button[data-a11y-theme="wb"]{
  color:#fff;
  background:#000;
  border-color:#000;
}
.emma-a11y__schemes button[data-a11y-theme="blue"]{
  color:#001f5b;
  background:#d9f1ff;
  border-color:#001f5b;
}

.emma-a11y__toggles{
  display:grid;
  gap:11px;
}

.emma-a11y__toggles label{
  display:flex;
  align-items:center;
  gap:10px;
  color:#102a4c;
  font-size:14px;
  line-height:1.4;
  font-weight:600;
  cursor:pointer;
}

.emma-a11y__toggles input{
  width:20px;
  height:20px;
  accent-color:#008289;
}

.emma-a11y__panel-actions{
  padding-top:16px;
}

.emma-a11y__reset{
  min-height:42px;
  padding:0 14px;
  border:1px solid #008289;
  border-radius:8px;
  background:#fff;
  color:#008289;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}


/* =========================================================
   Accessibility mode
   Applied to public content only. Widget itself is excluded.
   ========================================================= */

html.emma-a11y-font-large body{
  font-size:118%!important;
}

html.emma-a11y-font-xlarge body{
  font-size:135%!important;
}

/* Scale explicit pixel typography used by custom EMMA blocks */
html.emma-a11y-font-large body :where(
  main,header,footer,
  .elementor-location-header,
  .elementor-location-footer,
  [class*="emma-"]
):not(.emma-a11y):not(.emma-a11y *){
  --emma-a11y-scale:1.18;
}

html.emma-a11y-font-xlarge body :where(
  main,header,footer,
  .elementor-location-header,
  .elementor-location-footer,
  [class*="emma-"]
):not(.emma-a11y):not(.emma-a11y *){
  --emma-a11y-scale:1.35;
}

/* Common site text gets increased without destroying layout */
html.emma-a11y-font-large body :where(p,li,label,input,textarea,select,button,a,span,strong){
  font-size:max(1em,16px)!important;
  line-height:1.65!important;
}

html.emma-a11y-font-xlarge body :where(p,li,label,input,textarea,select,button,a,span,strong){
  font-size:max(1em,18px)!important;
  line-height:1.7!important;
}

/* Widget must keep its own usable size */
html.emma-a11y-font-large .emma-a11y *,
html.emma-a11y-font-xlarge .emma-a11y *{
  font-size:revert;
}


/* Contrast: black on white */
html.emma-a11y-theme-bw body,
html.emma-a11y-theme-bw body :where(main,section,article,div,header,footer,nav){
  background:#fff!important;
  color:#000!important;
  background-image:none!important;
  box-shadow:none!important;
}

html.emma-a11y-theme-bw body :where(h1,h2,h3,h4,h5,h6,p,li,span,strong,a,label,button){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
}

html.emma-a11y-theme-bw body :where(a,button,input,textarea,select){
  border-color:#000!important;
}

html.emma-a11y-theme-bw body a{
  text-decoration:underline!important;
}


/* Contrast: white on black */
html.emma-a11y-theme-wb body,
html.emma-a11y-theme-wb body :where(main,section,article,div,header,footer,nav){
  background:#000!important;
  color:#fff!important;
  background-image:none!important;
  box-shadow:none!important;
}

html.emma-a11y-theme-wb body :where(h1,h2,h3,h4,h5,h6,p,li,span,strong,a,label,button){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html.emma-a11y-theme-wb body :where(a,button,input,textarea,select){
  border-color:#fff!important;
  background:#000!important;
  color:#fff!important;
}

html.emma-a11y-theme-wb body a{
  text-decoration:underline!important;
}


/* Contrast: blue on light */
html.emma-a11y-theme-blue body,
html.emma-a11y-theme-blue body :where(main,section,article,div,header,footer,nav){
  background:#d9f1ff!important;
  color:#001f5b!important;
  background-image:none!important;
  box-shadow:none!important;
}

html.emma-a11y-theme-blue body :where(h1,h2,h3,h4,h5,h6,p,li,span,strong,a,label,button){
  color:#001f5b!important;
  -webkit-text-fill-color:#001f5b!important;
}

html.emma-a11y-theme-blue body :where(a,button,input,textarea,select){
  border-color:#001f5b!important;
}

html.emma-a11y-theme-blue body a{
  text-decoration:underline!important;
}


/* Preserve accessibility panel colors in every theme */
html[class*="emma-a11y-theme-"] .emma-a11y,
html[class*="emma-a11y-theme-"] .emma-a11y *{
  background:revert;
  color:revert;
  -webkit-text-fill-color:revert;
  box-shadow:revert;
}

html.emma-a11y-hide-images body img,
html.emma-a11y-hide-images body picture,
html.emma-a11y-hide-images body video,
html.emma-a11y-hide-images body iframe:not([title*="карта" i]){
  visibility:hidden!important;
}

html.emma-a11y-spacing body :where(p,li,a,button,label,span,strong){
  letter-spacing:.06em!important;
  word-spacing:.12em!important;
  line-height:1.8!important;
}

html.emma-a11y-links body a{
  text-decoration:underline!important;
  text-decoration-thickness:2px!important;
  text-underline-offset:3px!important;
}

/* Strong keyboard focus on the whole public site */
body :focus-visible{
  outline:3px solid #ffbf00!important;
  outline-offset:3px!important;
}

@media(prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto!important}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@media(max-width:767px){
  .emma-a11y__launcher{
    right:10px;
    bottom:10px;
    width:52px;
    height:52px;
    min-height:52px;
    padding:0;
    justify-content:center;
  }

  .emma-a11y__launcher-text{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }

  .emma-a11y__panel{
    right:10px;
    bottom:72px;
    width:calc(100vw - 20px);
  }
}


/* =========================================================
   EMMA•MED Core 1.7.8 — no red in accessibility UI
   Полностью исключаем наследование красных цветов темы.
   ========================================================= */

.emma-a11y button,
.emma-a11y button:hover,
.emma-a11y button:focus,
.emma-a11y button:focus-visible,
.emma-a11y button:active,
.emma-a11y input,
.emma-a11y label,
.emma-a11y span,
.emma-a11y strong{
  text-shadow:none!important;
  box-shadow:none!important;
  outline-color:rgba(0,130,137,.30)!important;
}

/* Основная кнопка */
.emma-a11y__launcher,
.emma-a11y__launcher:hover,
.emma-a11y__launcher:focus,
.emma-a11y__launcher:active{
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
  background:#fff!important;
  border-color:#008289!important;
}

/* Активные кнопки настроек */
.emma-a11y__controls button.is-active,
.emma-a11y__controls button.is-active:hover,
.emma-a11y__controls button.is-active:focus,
.emma-a11y__controls button.is-active:active{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#008289!important;
  border-color:#008289!important;
}

/* Обычные кнопки настроек */
.emma-a11y__controls button:not(.is-active):hover,
.emma-a11y__controls button:not(.is-active):focus,
.emma-a11y__controls button:not(.is-active):active,
.emma-a11y__close:hover,
.emma-a11y__close:focus,
.emma-a11y__close:active,
.emma-a11y__reset:hover,
.emma-a11y__reset:focus,
.emma-a11y__reset:active{
  color:#008289!important;
  -webkit-text-fill-color:#008289!important;
  background:#eef8f8!important;
  border-color:#008289!important;
}

/* Чекбоксы — только фирменный бирюзовый */
.emma-a11y__toggles input{
  accent-color:#008289!important;
}

/* Никаких красных focus/hover от глобальной темы */
.emma-a11y *:focus,
.emma-a11y *:focus-visible,
.emma-a11y *:hover{
  --e-global-color-accent:#008289!important;
}

/* В обычной цветовой схеме ссылки и кнопки сохраняют собственные цвета сайта. */

/* Клавиатурный фокус — фирменный бирюзовый вместо красного/жёлтого */
body :focus-visible{
  outline:3px solid #008289!important;
  outline-offset:3px!important;
}
