/* DiseaseBD v1.9.0 mobile rescue. DESKTOP IS NEVER MODIFIED. */
.dbd-mobile-header { display:none!important; }
@media only screen and (max-width:767px) {
  /* Hide the old header (whose narrow Elementor column obscured the input).
     WP admin bar and all desktop styles remain untouched. */
  body #masthead,
  body header.site-header,
  body .elementor-location-header,
  body .dbd-premium,
  body .ast-mobile-header-wrap,
  body .ast-desktop-header-wrap { display:none!important; }

  body .dbd-mobile-header {
    display:block!important;position:relative!important;z-index:999!important;
    background:#fff!important;width:100%!important;max-width:100%!important;
    border-bottom:1px solid #dce7ef!important;
    box-shadow:0 2px 9px rgba(10,42,77,.07)!important;
    margin:0!important;box-sizing:border-box!important;
  }
  body .dbd-mobile-header,body .dbd-mobile-header * { box-sizing:border-box!important; }
  body .dbd-mobile-header__inner {display:flex!important;flex-direction:column!important;
    align-items:stretch!important;gap:10px!important;max-width:100%!important;
    padding:11px 12px 12px!important;margin:0 auto!important;}
  body .dbd-mobile-header__brand {display:inline-flex!important;align-self:flex-start!important;
    align-items:center!important;min-height:33px!important;max-width:70%!important;
    padding:0!important;margin:0!important;line-height:1!important;text-decoration:none!important;}
  body .dbd-mobile-header__logo {display:block!important;width:auto!important;
    height:auto!important;max-height:39px!important;max-width:190px!important;object-fit:contain!important;}
  body .dbd-mobile-header__wordmark{font-family:Inter,Arial,sans-serif!important;font-size:25px!important;
    letter-spacing:-1.1px!important;font-weight:850!important;color:#1e4b78!important;line-height:1!important;}
  body .dbd-mobile-header__wordmark span{color:#258ec2!important;}
  body .dbd-mobile-header__search {display:block!important;width:100%!important;min-width:0!important;
    max-width:100%!important;margin:0!important;padding:0!important;}
  body .dbd-mobile-header .dbd-search {display:block!important;width:100%!important;min-width:0!important;
    max-width:100%!important;position:relative!important;z-index:3!important;}
  body .dbd-mobile-header .dbd-search__form {display:flex!important;flex-direction:row!important;
    flex-wrap:nowrap!important;align-items:stretch!important;width:100%!important;max-width:100%!important;
    min-width:0!important;min-height:48px!important;margin:0!important;padding:0!important;
    overflow:hidden!important;border:1px solid #b9d1e3!important;border-radius:9px!important;
    background:#fff!important;}
  body .dbd-mobile-header .dbd-search__scope {display:block!important;flex:0 0 94px!important;
    width:94px!important;min-width:94px!important;max-width:94px!important;
    height:auto!important;min-height:46px!important;max-height:none!important;
    padding:0 16px 0 9px!important;margin:0!important;border:0!important;border-right:1px solid #dce7ef!important;
    border-radius:0!important;background-color:#f0f6fa!important;font-size:12px!important;
    color:#1e4b78!important;line-height:1.2!important;}
  body .dbd-mobile-header .dbd-search__query {display:block!important;visibility:visible!important;
    opacity:1!important;pointer-events:auto!important;-webkit-appearance:none!important;appearance:none!important;
    flex:1 1 auto!important;width:1%!important;min-width:0!important;max-width:none!important;
    min-height:46px!important;height:auto!important;margin:0!important;padding:10px!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;
    font-size:16px!important;line-height:1.35!important;color:#193e61!important;}
  body .dbd-mobile-header .dbd-search__submit {display:flex!important;flex:0 0 49px!important;
    width:49px!important;min-width:49px!important;max-width:49px!important;
    min-height:46px!important;height:auto!important;margin:0!important;padding:0!important;
    align-items:center!important;justify-content:center!important;border:0!important;
    border-radius:0!important;background:#1e4b78!important;color:#fff!important;cursor:pointer!important;}
  body .dbd-mobile-header .dbd-search__submit span{display:none!important;}
  body .dbd-mobile-header .dbd-search__submit svg{display:block!important;width:20px!important;height:20px!important;}
  body .dbd-mobile-header .dbd-search__results{z-index:1000!important;top:calc(100% + 4px)!important;
    max-height:55vh!important;max-width:100%!important;}

  /* Keep content, not theme gutters, as the limit on single medicine pages. */
  body.single-brands #content > .ast-container,
  body.single-generics #content > .ast-container,
  body.single-brands .site-content > .ast-container,
  body.single-generics .site-content > .ast-container {
    display:block!important;width:100%!important;max-width:100%!important;
    padding-left:10px!important;padding-right:10px!important;margin-left:auto!important;margin-right:auto!important;
  }
  body.single-brands #primary, body.single-generics #primary,
  body.single-brands #main, body.single-generics #main,
  body.single-brands .site-main, body.single-generics .site-main {
    display:block!important;width:100%!important;max-width:100%!important;
    min-width:0!important;margin-left:0!important;margin-right:0!important;
    padding-left:0!important;padding-right:0!important;
  }
  body.single-brands .ast-article-single, body.single-generics .ast-article-single,
  body.single-brands.ast-separate-container .ast-article-single,
  body.single-generics.ast-separate-container .ast-article-single,
  body.single-brands .entry-content, body.single-generics .entry-content {
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;
    padding-left:0!important;padding-right:0!important;
  }
  /* Elementor widgets/containers controlling the brand or generic content. */
  body.single-brands .elementor-location-single .e-con:has(.dbd-gb-profile),
  body.single-generics .elementor-location-single .e-con:has(.dbd-generic-profile),
  body.single-brands .elementor-section:has(.dbd-gb-profile),
  body.single-generics .elementor-section:has(.dbd-generic-profile),
  body.single-brands .elementor-widget-wrap:has(.dbd-gb-profile),
  body.single-generics .elementor-widget-wrap:has(.dbd-generic-profile),
  body.single-brands .elementor-container:has(.dbd-gb-profile),
  body.single-generics .elementor-container:has(.dbd-generic-profile) {
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding-left:0!important;padding-right:0!important;
    margin-left:0!important;margin-right:0!important;
  }
  body.single-brands .dbd-gb-profile,body.single-generics .dbd-generic-profile {
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding-left:0!important;padding-right:0!important;
  }
  body.single-generics .dbd-generic-layout {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
  body.single-generics .dbd-generic-clinical-content,
  body.single-brands .dbd-gb-content {padding:13px!important;font-size:14px!important;line-height:1.7!important;}
  body.single-generics .dbd-generic-hero {padding:16px 13px!important;}
  body.single-generics .dbd-generic-clinical-content p,
  body.single-generics .dbd-generic-clinical-content li,
  body.single-brands .dbd-gb-content p,
  body.single-brands .dbd-gb-content li {text-align:left!important;text-align-last:auto!important;}
  body.single-generics .dbd-generic-toc {position:static!important;max-height:none!important;}
  body.single-brands .dbd-gb-profile .dbd-gb-columns {grid-template-columns:minmax(0,1fr)!important;}
}

/* v1.9.0 Homepage: Elementor sites sometimes place the old header in
   normal page sections rather than the dedicated Elementor header template.
   JS identifies only a top-of-page branded toolbar and marks it for hiding.
   This intentionally does not affect the hero search farther down the page. */
@media only screen and (max-width:767px) {
  body.home .dbd-mobile-legacy-home-toolbar,
  body.front-page .dbd-mobile-legacy-home-toolbar,
  body.page-template-elementor_canvas .dbd-mobile-legacy-home-toolbar {
    display:none!important;
  }
  body.home .dbd-mobile-header,
  body.front-page .dbd-mobile-header {
    display:block!important;
  }
  body.home .dbd-mobile-header__search .dbd-search__form,
  body.front-page .dbd-mobile-header__search .dbd-search__form {
    width:100%!important;
  }
}

/* v1.9.0 – visible, navy Browse Directory navigation under mobile search.
   Scope to plugin's replacement header: desktop/header templates are unchanged.
   Native <details> means tapping Browse Directory still works if JS fails. */
.dbd-mobile-nav { display:none!important; }
@media only screen and (max-width:767px) {
  body .dbd-mobile-header .dbd-mobile-nav {
    display:block!important; width:100%!important; max-width:100%!important;
    background:#0d2f55!important; color:#fff!important; margin:0!important;
    position:relative!important; z-index:2!important;
    font:600 13px/1.45 Inter,Arial,sans-serif!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav *,
  body .dbd-mobile-header .dbd-mobile-nav *::before,
  body .dbd-mobile-header .dbd-mobile-nav *::after {box-sizing:border-box!important;}
  body .dbd-mobile-header .dbd-mobile-nav__toggle {
    display:flex!important; align-items:center!important; justify-content:space-between!important;
    min-height:49px!important; width:100%!important; padding:12px 18px!important;
    margin:0!important; cursor:pointer!important; color:#fff!important;
    background:#0d2f55!important; list-style:none!important;
    font:700 13px/1.4 Inter,Arial,sans-serif!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__toggle::-webkit-details-marker {display:none!important;}
  body .dbd-mobile-header .dbd-mobile-nav__toggle::marker {content:'';}
  body .dbd-mobile-header .dbd-mobile-nav__toggle:focus-visible {outline:3px solid #80c5ed!important;outline-offset:-3px!important;}
  body .dbd-mobile-header .dbd-mobile-nav__toggle svg{flex:none!important;width:21px!important;height:21px!important;}
  body .dbd-mobile-header .dbd-mobile-nav__panel{
    width:100%!important;background:#fff!important;color:#1e4b78!important;
    padding:8px 12px 13px!important;border-bottom:1px solid #d6e5f0!important;
    box-shadow:0 8px 19px rgba(12,37,61,.1)!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items,
  body .dbd-mobile-header .dbd-mobile-nav__items .sub-menu {
    display:flex!important; flex-direction:column!important; padding:0!important;
    margin:0!important; list-style:none!important; width:100%!important;
    max-width:100%!important; position:static!important; min-width:0!important;
    border:0!important; box-shadow:none!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items li {list-style:none!important;margin:0!important;padding:0!important;}
  body .dbd-mobile-header .dbd-mobile-nav__items > li > a {
    display:flex!important; align-items:center!important; justify-content:space-between!important;
    min-height:43px!important; width:100%!important; padding:10px 12px!important;
    text-decoration:none!important; font-size:14px!important; line-height:1.4!important;
    font-weight:650!important; color:#1e4b78!important; background:transparent!important;
    border-radius:5px!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items > li > a:hover,
  body .dbd-mobile-header .dbd-mobile-nav__items > li > a:focus-visible,
  body .dbd-mobile-header .dbd-mobile-nav__items > li.current-menu-item > a {
    background:#eaf3fa!important;color:#123d64!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items > li.menu-item-has-children > a::after {
    content:'▾'!important; padding-left:10px!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items .sub-menu{
    display:none!important; background:#f0f6fa!important; padding:5px 0 6px 12px!important;
    border-radius:7px!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items li.is-subopen > .sub-menu,
  body .dbd-mobile-header .dbd-mobile-nav__items li.menu-item-has-children:focus-within > .sub-menu {
    display:flex!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items .sub-menu a {
    display:block!important;text-decoration:none!important;color:#2a5678!important;
    padding:10px 12px!important;background:transparent!important;
    min-height:40px!important;font-size:13px!important;
  }
  body .dbd-mobile-header .dbd-mobile-nav__items .sub-menu a:hover,
  body .dbd-mobile-header .dbd-mobile-nav__items .sub-menu a:focus-visible {
    background:#dfedf7!important;color:#123d64!important;
  }
}
