/* Loaded after the generated menu CSS.
   Nested grid rows are floated. Without a block formatting context they
   escape their menu item and push the next link to the bottom of the panel. */

.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu > li.mega-menu-item,
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu > li.mega-dynamic-parent-link > ul.mega-sub-menu > li.mega-menu-item,
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu > li.mega-dynamic-parent-link > ul.mega-sub-menu > li.mega-menu-row {
  display: flow-root !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Show nested blocks as soon as the right column is open. Waiting for a
   second hover made the panel jump. */
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic.mega-toggle-on > ul.mega-sub-menu > li.mega-dynamic-hover > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu,
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic.mega-toggle-on > ul.mega-sub-menu > li.mega-dynamic-parent-link > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu {
  display: block !important;
  visibility: visible !important;
  position: static !important;
  height: auto !important;
  opacity: 1 !important;
}

.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu > li.mega-menu-item > ul.mega-sub-menu > li.mega-menu-row,
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu > li.mega-dynamic-parent-link > ul.mega-sub-menu > li.mega-menu-row {
  display: flow-root !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

/* An empty right column should not reserve a tall blank panel. */
.mega-menu-wrap .mega-menu > li.mega-menu-dynamic > ul.mega-sub-menu {
  min-height: 0;
}

/* MediaElement measures the panel while it is hidden and writes an inline
   min-width large enough to overflow the page. Keep widgets inside the column. */
.mega-menu-wrap .mega-menu li.mega-menu-dynamic .textwidget img,
.mega-menu-wrap .mega-menu li.mega-menu-dynamic .widget img {
  max-width: 100%;
  height: auto;
}

.mega-menu-wrap .mega-menu li.mega-menu-dynamic .wp-video,
.mega-menu-wrap .mega-menu li.mega-menu-dynamic .mejs-container,
.mega-menu-wrap .mega-menu li.mega-menu-dynamic .mejs-container video,
.mega-menu-wrap .mega-menu li.mega-menu-dynamic video,
.mega-menu-wrap .mega-menu li.mega-menu-dynamic iframe {
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
}

.mega-menu-wrap .mega-menu li.mega-menu-dynamic .wp-video {
  height: auto !important;
}

.mega-menu-wrap .mega-menu li.mega-menu-dynamic .mejs-offscreen {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}

.mega-menu-wrap .mega-menu li.mega-menu-dynamic .mejs-container {
  height: 0 !important;
  padding-top: 56.25%;
  overflow: hidden;
}

.mega-menu-wrap .mega-menu li.mega-menu-dynamic .mejs-container .mejs-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
}
