/* Bahr Global Light/Dark Theme — intentionally does not filter or recolor images/media. */
.bahr-theme-toggle{
  --bahr-theme-toggle-size:40px;width:var(--bahr-theme-toggle-size);height:var(--bahr-theme-toggle-size);min-width:var(--bahr-theme-toggle-size);
  display:inline-grid;place-items:center;position:relative;padding:0!important;margin:0;border:1px solid rgba(112,122,138,.24)!important;
  border-radius:13px!important;background-color:#fff!important;color:#1E2329!important;box-shadow:0 4px 16px rgba(30,35,41,.08)!important;
  cursor:pointer;line-height:1;vertical-align:middle;transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease
}
.bahr-theme-toggle:hover{transform:translateY(-1px);box-shadow:0 7px 20px rgba(30,35,41,.12)!important}
.bahr-theme-toggle:focus-visible{outline:3px solid rgba(240,185,11,.28)!important;outline-offset:2px}
.bahr-theme-icon{width:55%;height:55%;display:grid;place-items:center;position:relative}
.bahr-theme-svg{width:100%;height:100%;position:absolute;inset:0;transition:opacity .18s ease,transform .24s ease}
.bahr-theme-sun{opacity:0;transform:rotate(-70deg) scale(.7)}
.bahr-theme-moon{opacity:1;transform:rotate(0) scale(1)}
html[data-bahr-theme="dark"] .bahr-theme-toggle{background-color:#1B2129!important;color:#F0B90B!important;border-color:#343B45!important;box-shadow:0 7px 22px rgba(0,0,0,.22)!important}
html[data-bahr-theme="dark"] .bahr-theme-sun{opacity:1;transform:rotate(0) scale(1)}
html[data-bahr-theme="dark"] .bahr-theme-moon{opacity:0;transform:rotate(70deg) scale(.7)}

html[data-bahr-theme="dark"]{color-scheme:dark;background-color:var(--bahr-theme-bg)}
html[data-bahr-theme="dark"] body{background-color:var(--bahr-theme-bg)!important;color:var(--bahr-theme-text)!important}
html[data-bahr-theme="dark"] :where(.site,.site-content,.site-main,.page-content,.entry-content,.content-area,#content,#page){color:var(--bahr-theme-text)}
html[data-bahr-theme="dark"] :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,label,legend,summary,figcaption,th,td){color:inherit}
html[data-bahr-theme="dark"] :where(input:not([type="button"]):not([type="submit"]):not([type="reset"]),textarea,select){background-color:var(--bahr-theme-input)!important;color:var(--bahr-theme-text)!important;border-color:var(--bahr-theme-border)!important}
html[data-bahr-theme="dark"] :where(input,textarea)::placeholder{color:var(--bahr-theme-muted)!important;opacity:1}
html[data-bahr-theme="dark"] :where(table,thead,tbody,tfoot,tr,th,td){border-color:var(--bahr-theme-border)}
html[data-bahr-theme="dark"] :where(hr){border-color:var(--bahr-theme-border)}
html[data-bahr-theme="dark"] :where(.wp-block-table table,.woocommerce table.shop_table,.woocommerce form.checkout,.woocommerce form.login,.woocommerce form.register,.woocommerce-account .woocommerce-MyAccount-content,.woocommerce .cart_totals,.woocommerce-checkout #payment,.learndash-wrapper,.wpdiscuz-comment-message){background-color:var(--bahr-theme-surface);color:var(--bahr-theme-text);border-color:var(--bahr-theme-border)}
html[data-bahr-theme="dark"] :where(.woocommerce-message,.woocommerce-info,.woocommerce-error){background-color:var(--bahr-theme-surface)!important;color:var(--bahr-theme-text)!important;border-color:var(--bahr-theme-border)!important}
html[data-bahr-theme="dark"] :where(.modal,.modal-content,.dialog-widget-content,.elementor-popup-modal .dialog-widget-content){color:var(--bahr-theme-text)}
html[data-bahr-theme="dark"] :where(.bahr-theme-auto-bg){background-color:var(--bahr-theme-surface)!important}
html[data-bahr-theme="dark"] :where(.bahr-theme-auto-bg-root){background-color:var(--bahr-theme-bg)!important}
html[data-bahr-theme="dark"] :where(.bahr-theme-auto-text){color:var(--bahr-theme-text)!important}
html[data-bahr-theme="dark"] :where(.bahr-theme-auto-muted){color:var(--bahr-theme-muted)!important}
html[data-bahr-theme="dark"] :where(.bahr-theme-auto-border){border-color:var(--bahr-theme-border)!important}

/* Common Bahr brand inline dark text: preserve gold/accent colors, only fix neutral dark text. */
html[data-bahr-theme="dark"] [style*="color:#1E2329" i],
html[data-bahr-theme="dark"] [style*="color: #1E2329" i],
html[data-bahr-theme="dark"] [style*="color:#000" i],
html[data-bahr-theme="dark"] [style*="color: #000" i]{color:var(--bahr-theme-text)!important}

/* Media is intentionally excluded from theme transformation: no invert/filter/blend/replacement rules. */
@media (prefers-reduced-motion:reduce){.bahr-theme-toggle,.bahr-theme-svg{transition:none!important}}


/* ===== v1.6.1 — Elementor header/menu contrast in global dark mode =====
   Applies only while Bahr global theme is dark.
   Main nav text stays white, Elementor pointer/underline is white,
   dropdown surfaces stay dark and submenu text stays white.
*/
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-nav-menu > .menu-item > .elementor-item,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-item,
html[data-bahr-theme="dark"] .elementor-nav-menu--main a.elementor-item,
html[data-bahr-theme="dark"] header .elementor-nav-menu--main .elementor-item{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

/* Keep menu text white on hover/current/active as requested. */
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-item:hover,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-item:focus,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-item.elementor-item-active,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .current-menu-item > .elementor-item,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .current-menu-ancestor > .elementor-item{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

/* Elementor pointer/underline/overline must be white in dark mode. */
html[data-bahr-theme="dark"] .elementor-nav-menu--main.e--pointer-underline .elementor-item::after,
html[data-bahr-theme="dark"] .elementor-nav-menu--main.e--pointer-overline .elementor-item::before,
html[data-bahr-theme="dark"] .elementor-nav-menu--main.e--pointer-double-line .elementor-item::before,
html[data-bahr-theme="dark"] .elementor-nav-menu--main.e--pointer-double-line .elementor-item::after,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .e--pointer-underline .elementor-item::after,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .e--pointer-overline .elementor-item::before,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .e--pointer-double-line .elementor-item::before,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .e--pointer-double-line .elementor-item::after{
  background-color:#FFFFFF!important;
  border-color:#FFFFFF!important;
}

/* Generic Elementor pointer fallback, including current/hover states. */
html[data-bahr-theme="dark"] header .elementor-nav-menu--main .elementor-item::before,
html[data-bahr-theme="dark"] header .elementor-nav-menu--main .elementor-item::after{
  border-color:#FFFFFF!important;
}

/* Dropdown/submenu: dark surface + white text. */
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .sub-menu,
html[data-bahr-theme="dark"] header .elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] header .elementor-nav-menu--dropdown .sub-menu{
  background-color:#181A20!important;
  border-color:#343B45!important;
  color:#FFFFFF!important;
}

html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .elementor-sub-item,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown a,
html[data-bahr-theme="dark"] .elementor-nav-menu .sub-menu a,
html[data-bahr-theme="dark"] header .sub-menu .elementor-sub-item{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  background-color:#181A20!important;
  border-color:#343B45!important;
}

/* Dropdown hover/focus/current: still white text with a slightly lighter dark row. */
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .elementor-sub-item:hover,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .elementor-sub-item:focus,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .elementor-sub-item.elementor-item-active,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown .current-menu-item > .elementor-sub-item,
html[data-bahr-theme="dark"] .elementor-nav-menu .sub-menu a:hover,
html[data-bahr-theme="dark"] .elementor-nav-menu .sub-menu a:focus{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  background-color:#232A33!important;
}

/* Mobile Elementor menu toggle and its SVG/icon must remain visible in dark mode. */
html[data-bahr-theme="dark"] .elementor-menu-toggle,
html[data-bahr-theme="dark"] .elementor-menu-toggle svg,
html[data-bahr-theme="dark"] .elementor-menu-toggle i{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

/* Common native/theme menu fallback outside Elementor. */
html[data-bahr-theme="dark"] header :where(nav,.menu,.main-navigation) > ul > li > a{
  color:#FFFFFF!important;
}
html[data-bahr-theme="dark"] header :where(nav,.menu,.main-navigation) .sub-menu{
  background:#181A20!important;
  border-color:#343B45!important;
}
html[data-bahr-theme="dark"] header :where(nav,.menu,.main-navigation) .sub-menu a{
  color:#FFFFFF!important;
}


/* ===== v1.6.2 — exact Elementor SmartMenus dropdown fix =====
   Target reported markup:
   ul.sub-menu.elementor-nav-menu--dropdown.sm-nowrap
*/
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown.sm-nowrap,
html[data-bahr-theme="dark"] .elementor-nav-menu--main ul.sub-menu.elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] header ul.sub-menu.elementor-nav-menu--dropdown{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  border:1px solid #343B45!important;
  box-shadow:0 12px 30px rgba(0,0,0,.30)!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown.sm-nowrap > li{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li > a.elementor-sub-item,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li > a.elementor-sub-item.bahr-theme-auto-text,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown.sm-nowrap > li > a.elementor-sub-item{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li > a.elementor-sub-item:hover,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li > a.elementor-sub-item:focus,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li.current-menu-item > a.elementor-sub-item,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li.current-menu-ancestor > a.elementor-sub-item{
  background:#232A33!important;
  background-color:#232A33!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

/* Prevent Smart Colors classes from creating white-on-white in this component. */
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown.bahr-theme-auto-bg,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown .bahr-theme-auto-bg{
  background:#181A20!important;
  background-color:#181A20!important;
}


/* ===== v1.6.3 — hard dark-mode fixes for Elementor buttons + nested menus ===== */

/* Parent menu item which owns a submenu, including its caret arrow. */
html[data-bahr-theme="dark"] .elementor-nav-menu--main a.elementor-item.has-submenu,
html[data-bahr-theme="dark"] .elementor-nav-menu--main .elementor-item.has-submenu,
html[data-bahr-theme="dark"] a.elementor-item.has-submenu[aria-haspopup="true"]{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

html[data-bahr-theme="dark"] a.elementor-item.has-submenu .sub-arrow,
html[data-bahr-theme="dark"] a.elementor-item.has-submenu .sub-arrow svg,
html[data-bahr-theme="dark"] a.elementor-item.has-submenu .sub-arrow svg path{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  stroke:#FFFFFF!important;
}

/* Exact SmartMenus dropdown surface and every visible row. */
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown.sm-nowrap,
html[data-bahr-theme="dark"] .elementor-nav-menu--main ul.sub-menu.elementor-nav-menu--dropdown,
html[data-bahr-theme="dark"] .elementor-nav-menu--dropdown ul.sub-menu{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown > li,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown li.menu-item{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown a,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown a.elementor-sub-item,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown a.bahr-theme-auto-text{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown a:hover,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown a:focus,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown li.current-menu-item > a,
html[data-bahr-theme="dark"] ul.sub-menu.elementor-nav-menu--dropdown li.current-menu-ancestor > a{
  background:#232A33!important;
  background-color:#232A33!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

/*
 * Elementor buttons that Smart Colors already identified as dark-text elements.
 * These are the reported quiz/comment buttons: white surface + white text was the bug.
 * We do not recolor every branded Elementor button; only buttons marked by our smart-text classifier.
 */
html[data-bahr-theme="dark"] .elementor-widget-button a.elementor-button.bahr-theme-auto-text,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text){
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  border-color:#343B45!important;
}

html[data-bahr-theme="dark"] .elementor-widget-button a.elementor-button.bahr-theme-auto-text:hover,
html[data-bahr-theme="dark"] .elementor-widget-button a.elementor-button.bahr-theme-auto-text:focus,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text):hover,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text):focus{
  background:#232A33!important;
  background-color:#232A33!important;
  color:#FFFFFF!important;
}

html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button.bahr-theme-auto-text *,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text) *{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
}

html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button.bahr-theme-auto-text svg,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button.bahr-theme-auto-text svg path,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text) svg,
html[data-bahr-theme="dark"] .elementor-widget-button .elementor-button:has(.bahr-theme-auto-text) svg path{
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  stroke:currentColor;
}

/* Fallback for browsers/selectors where :has() is unavailable:
   the reported markup places bahr-theme-auto-text on the button itself. */
html[data-bahr-theme="dark"] a.elementor-button.elementor-button-link.bahr-theme-auto-text{
  background:#181A20!important;
  background-color:#181A20!important;
  color:#FFFFFF!important;
  fill:#FFFFFF!important;
  border-color:#343B45!important;
}
