/*
 * wxrx overrides — behaviour that layui.js used to provide at runtime on the
 * legacy site, reimplemented in CSS so we don't have to ship jQuery + layui JS.
 * Loaded last, after the original theme stylesheets.
 */

/* Dropdown menus: layui.js toggled these on hover. */
.header .layui-nav .layui-nav-item > .layui-nav-child {
  display: none;
}
.header .layui-nav .layui-nav-item:hover > .layui-nav-child {
  display: block;
}
/* layui rotates the caret via a class on hover */
.header .layui-nav .layui-nav-item:hover > a .layui-nav-more {
  transform: rotate(180deg);
  margin-top: -9px;
}

/* layui hides breadcrumbs until element.render() runs; we render them server-side. */
.layui-breadcrumb {
  visibility: visible;
  font-size: 14px;
}
.layui-breadcrumb > * {
  font-size: 14px;
}

/* Tailwind preflight (loaded by the admin bundle) resets images to display:block
   and strips list/heading defaults — restore what the legacy theme assumes. */
.header img,
.index-container img,
.footer-cust img,
.wxrx-main img {
  display: inline-block;
}

/* Mobile nav toggle (legacy theme used layui's JS) */
@media screen and (max-width: 768px) {
  .header .ew-nav-group .layui-nav {
    display: none;
  }
  .header .ew-nav-group .layui-nav.nav-open {
    display: block;
  }
  .header .layui-nav .layui-nav-item > .layui-nav-child,
  .header .layui-nav .layui-nav-item:hover > .layui-nav-child {
    position: static;
    display: block;
    box-shadow: none;
  }
}
