/* Accessible dropdowns for Divi menu modules — pairs with js/accessible-dropdowns.js */

.et-menu-nav .mhc-subnav-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 28.8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: inherit;
  cursor: pointer;
}

.et-menu-nav .mhc-subnav-toggle::before {
  content: "3"; /* Divi's own chevron glyph */
  font-family: ETmodules;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.et-menu-nav .mhc-subnav-toggle[aria-expanded="true"]::before {
  transform: rotate(180deg);
}

/* The button now draws the chevron, so drop Divi's decorative one */
.et-menu-nav .mhc-has-toggle > a {
  padding-right: 0 !important;
}

.et-menu-nav .mhc-has-toggle > a::after {
  display: none !important;
}

.et-menu-nav li.mhc-open > ul {
  opacity: 1 !important;
  visibility: visible !important;
}

.et-menu-nav a:focus-visible,
.et-menu-nav .mhc-subnav-toggle:focus-visible {
  outline: 2px solid #003366 !important;
  outline-offset: 2px;
}

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