/* ==========================================================================
   Section navigation — Top button + content-menu dropdown
   (styles the markup produced by navigation-dropdown.js)
   ========================================================================== */

/* --- Toggle open/closed state -------------------------------------------- */
/* Bootstrap adds `.show` to `.dropdown` when open. Swap the hamburger (.hide)
   and close-X (.show) icons accordingly, and drop the default caret. */
.dropdown-toggle::after {
  display: none !important;
}

.dropdown.show .hide,
.dropdown .show {
  display: none;
}

.dropdown.show .show,
.dropdown .hide {
  display: block;
}

/* --- Dropdown toggle button ---------------------------------------------- */
.comp-webmdheader .dropdown .dropdown-toggle {
  width: auto;
  height: 40px;
  border-radius: 4px;
  border: solid 1px #979797;
  background-color: #ffffff;
  text-align: unset;
  text-transform: uppercase;
}

.comp-webmdheader .dropdown.show .dropdown-toggle {
  width: 50px;
  border-radius: 4px 4px 0 0;
  border-bottom: none;
}

.comp-webmdheader .dropdown.show .btn.focus,
.btn:focus {
  box-shadow: unset;
}

/* --- Top button ----------------------------------------------------------- */
button#top {
  width: 83px;
  height: 40px;
  margin: 0 10px;
  border-radius: 4px;
  border: solid 1px #979797;
  background-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- Dropdown menu panel -------------------------------------------------- */
.dropdown-menu.show {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(-305px, 36px, 0px) !important;
  will-change: transform;
  width: 355px;
  border: solid 1px #979797;
  border-top: none;
  border-radius: 4px 0 4px 4px;
  background-color: #ffffff;
}

/* --- Menu items ----------------------------------------------------------- */
.comp-webmdheader ul li {
  padding: 10px 30px;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  line-height: 24px;
  color: #000;
  cursor: pointer;
}

.comp-webmdheader ul li a {
  display: inline-block;
  width: 100%;
}

/* Divider above the first item. */
.comp-webmdheader ul li:first-child:before {
  content: "";
  position: absolute;
  top: 0;
  width: 86%;
  margin-left: -8%;
  border-bottom: 1px solid #979797;
}

.comp-webmdheader li.learnMore a {
  color: #fff !important;
}

/* --- Labels & links ------------------------------------------------------- */
.dropdown label,
.btn-top label {
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 18.75px;
  color: #000;
  margin-bottom: 0 !important;
}

.btn-top label {
  text-transform: uppercase;
}

.comp-webmdheader a,
#webmd-base-header a {
  color: #000;
}

/* --- Icon positioning ----------------------------------------------------- */
.dropdown svg {
  transform: translate3d(4px, 3px, 0px) !important;
}

.dropdown .hide svg {
  float: right;
}

.btn-top svg {
  transform: translate3d(5px, 0px, 0px) !important;
}

/* Optional font-awesome icon fallbacks (only used if the markup swaps the
   inline SVGs for these spans). */
span.nav-icon-close::before {
  content: "\f00d";
  font-family: "font-awesome";
  font-size: 24px;
  line-height: 16px;
  text-align: center;
}

span.nav-icon-hamburger::before {
  content: "\f0c9";
  font-family: "font-awesome";
  font-size: 18px;
  float: right;
}

/* --- Focus reset ---------------------------------------------------------- */
.comp-webmdheader .btn:focus,
.comp-webmdheader .btn.focus {
  outline: none;
  box-shadow: none;
}

/* --- Layout --------------------------------------------------------------- */
.pull-right {
  float: right;
  margin-top: 5px;
}

.section-webmdheader .funded-disclaimer-container {
  justify-content: unset;
  margin: 0 20px;
}

.funded-disclaimer-container .dropdown {
  margin: 10px 0;
  text-align: left;
}

.funded-disclaimer-container > a {
  margin-left: auto;
}

/* Smooth in-page scrolling for the jump links. */
html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media only screen and (max-width: 991.98px) {
  .section-webmdheader .funded-disclaimer-container .disclaimer-text {
    max-width: 297px;
  }
}

@media only screen and (max-width: 767.98px) {
  .comp-webmdheader .dropdown .dropdown-toggle,
  .comp-webmdheader .btn-top {
    width: 50px;
    padding-bottom: 11px;
  }

  button#top {
    width: 50px;
  }

  .dropdown-menu.show {
    transform: translate3d(-241px, 36px, 0px) !important;
    width: 291px;
  }

  .btn-top svg {
    transform: translate3d(0px, 2px, 0px) !important;
  }

  /* Icon-only on small screens — hide the text labels. */
  .dropdown label,
  .btn-top label {
    display: none;
  }

  .comp-webmdheader ul li {
    font-size: 14.4px;
    line-height: normal;
  }

  .comp-webmdheader ul li:first-child:before {
    width: 83%;
    margin-left: -10%;
  }

  .section-webmdheader .funded-disclaimer-container .disclaimer-text {
    max-width: 270px;
    font-size: 15px;
  }
}
