/* =========================================================
   EMMA•MED Core 2.0.1 — final client fixes 2026-09-09
   ========================================================= */

/* 1. Primary CTA text must always be readable in normal colour mode.
   Important: these selectors cover both shortcode buttons and Elementor/HTML page buttons. */
html:not(.emma-a11y-theme-bw):not(.emma-a11y-theme-wb):not(.emma-a11y-theme-blue) body :is(
  .emma-hero__button--primary,
  .emma-about-hero__btn--primary,
  .emma-about-page__btn--primary,
  .emma-about__btn--primary,
  .emma-dav2-btn--primary,
  .emma-direction-btn--primary,
  .emma-direction-booking__button,
  .emma-service__btn--primary,
  .emma-doctor__btn--primary,
  .emma-doc-btn--primary,
  .emma-price-v4__btn--primary,
  .emma-reviews-page__btn--primary,
  .emma-reviews__aside-link,
  a[href="#emma-book"].elementor-button,
  .elementor-location-header a[href="#emma-book"]
){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html:not(.emma-a11y-theme-bw):not(.emma-a11y-theme-wb):not(.emma-a11y-theme-blue) body :is(
  .emma-hero__button--primary,
  .emma-about-hero__btn--primary,
  .emma-about-page__btn--primary,
  .emma-about__btn--primary,
  .emma-dav2-btn--primary,
  .emma-direction-btn--primary,
  .emma-direction-booking__button,
  .emma-service__btn--primary,
  .emma-doctor__btn--primary,
  .emma-doc-btn--primary,
  .emma-price-v4__btn--primary,
  .emma-reviews-page__btn--primary,
  .emma-reviews__aside-link,
  a[href="#emma-book"].elementor-button,
  .elementor-location-header a[href="#emma-book"]
) :where(span,strong,b,i){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Header booking button can be plain <a>, not necessarily Elementor Button. */
html:not(.emma-a11y-theme-bw):not(.emma-a11y-theme-wb):not(.emma-a11y-theme-blue) .elementor-location-header a[href="#emma-book"]{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* 2. Homepage About photo: use the full-resolution source without artificial enlargement. */
.emma-about__photo img{
  width:100%!important;
  height:100%!important;
  top:0!important;
  object-fit:cover!important;
  object-position:center center!important;
}

/* 3. Accessibility panel is deliberately isolated from the selected site scheme. */
html[class*="emma-a11y-theme-"] .emma-a11y__panel,
.emma-a11y__panel{
  background:#fff!important;
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
  border-color:#cbd9dc!important;
  box-shadow:0 18px 50px rgba(16,42,76,.22)!important;
}

html[class*="emma-a11y-theme-"] .emma-a11y__panel :where(
  .emma-a11y__panel-head,
  .emma-a11y__section,
  .emma-a11y__panel-actions,
  .emma-a11y__controls,
  .emma-a11y__toggles,
  label,
  strong,
  span
){
  background:transparent!important;
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
}

html[class*="emma-a11y-theme-"] .emma-a11y__panel-head,
html[class*="emma-a11y-theme-"] .emma-a11y__section{
  border-color:#e1e9eb!important;
}

html[class*="emma-a11y-theme-"] .emma-a11y__close,
.emma-a11y__close{
  background:#fff!important;
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
  border:1px solid #cbd9dc!important;
}

/* Text size controls remain obvious in every colour scheme. */
html[class*="emma-a11y-theme-"] .emma-a11y__controls:not(.emma-a11y__schemes) button{
  background:#fff!important;
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
  border:2px solid #aebfc4!important;
}
html[class*="emma-a11y-theme-"] .emma-a11y__controls:not(.emma-a11y__schemes) button.is-active{
  background:#008289!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border-color:#008289!important;
}

/* Scheme selector: show names, not four unexplained letters A. */
.emma-a11y__schemes{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:9px!important;
}
.emma-a11y__schemes button{
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  padding:7px 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  border-width:2px!important;
  border-style:solid!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
.emma-a11y__scheme-letter{
  width:31px!important;
  height:31px!important;
  flex:0 0 31px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid currentColor!important;
  border-radius:6px!important;
  font-size:15px!important;
  line-height:1!important;
  font-weight:900!important;
  background:transparent!important;
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}
.emma-a11y__scheme-name{
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:800!important;
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

.emma-a11y__schemes button[data-a11y-theme="normal"]{
  background:#fff!important;
  color:#102a4c!important;
  -webkit-text-fill-color:#102a4c!important;
  border-color:#008289!important;
}
.emma-a11y__schemes button[data-a11y-theme="bw"]{
  background:#fff!important;
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  border-color:#000!important;
}
.emma-a11y__schemes button[data-a11y-theme="wb"]{
  background:#000!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border-color:#000!important;
}
.emma-a11y__schemes button[data-a11y-theme="blue"]{
  background:#d9f1ff!important;
  color:#001f5b!important;
  -webkit-text-fill-color:#001f5b!important;
  border-color:#001f5b!important;
}
.emma-a11y__schemes button.is-active{
  outline:3px solid #008289!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 1px #fff!important;
}

html[class*="emma-a11y-theme-"] .emma-a11y__toggles input{
  accent-color:#008289!important;
}
html[class*="emma-a11y-theme-"] .emma-a11y__reset,
.emma-a11y__reset{
  background:#fff!important;
  color:#008289!important;
  -webkit-text-fill-color:#008289!important;
  border:1px solid #008289!important;
}

@media(max-width:430px){
  .emma-a11y__schemes{grid-template-columns:1fr!important}
}
