/* assets/css/em-inline-menu.css
 * EM Inline Menu — Master stylesheet (FINAL NORMALIZE ONLY)
 *
 * IMPORTANT:
 * - Do NOT use @import here (SiteGround combine/minify breaks relative imports).
 * - Do NOT use @charset here (combined files may invalidate it).
 *
 * This file is intentionally "last layer" overrides only.
 */

/* =========================================================
   FINAL NORMALIZE (MUST BE LAST)
   Fix: icon + label vertical centering + consistent spacing
   + FORCE icon media height to AUTO (no height:100%)
   + Force submenu toggle to be icon-only (no circle)
   + Remove any legacy caret/pseudo toggle icon
   + Force SVG 180° rotation animation
   ========================================================= */

/* Use GAP for spacing (avoid mixing margin-right + gap) */
.emimw-item-icon {
  margin-right: 0 !important;
}

/* All clickable rows that contain icon + text */
.emimw-nav__link,
.emimw-nav__panel .emimw-panel-row > a,
.emimw-nav__panel .sub-menu a,
.emimw-mega__catlink,
.emimw-mega__a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--emimw-icon-gap);
  line-height: 1.2;
}

/* Panel links should be full width */
.emimw-nav__panel .emimw-panel-row > a,
.emimw-nav__panel .sub-menu a {
  width: 100%;
}

/* Icon wrapper: do NOT set height here, only width */
.emimw-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: var(--emimw-icon-size);
}

/* Media + inline SVG: height MUST be auto (override any previous height:100%) */
.emimw-item-icon img,
.emimw-item-icon svg {
  display: block;
  width: 100%;
  height: auto !important;

  max-width: 100%;
  max-height: none !important;
}

/* Dashicons: no height/line-height here (Elementor control sets font-size/line-height) */
.emimw-item-icon .dashicons {
  display: block;
  width: 100%;
}

/* =========================================================
   DESKTOP TEMPLATE TOGGLE: ICON-ONLY
   ========================================================= */

/* Desktop template toggle: icon-only, no visible box */
.emimw-nav__tpl-toggle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  padding: 0 !important;
  margin: 0 !important;

  border-radius: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;

  width: auto !important;
  height: auto !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: inherit;

  appearance: none;
  -webkit-appearance: none;
}

.emimw-nav__tpl-toggle:hover,
.emimw-nav__tpl-toggle:focus {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
  color: inherit;
}

/* Desktop caret inherits currentColor (if used in desktop.css) */
.emimw-nav__tpl-icon {
  border-right-color: currentColor;
  border-bottom-color: currentColor;
}

/* =========================================================
   SUBMENU TOGGLE: ICON-ONLY + NO DUPLICATE ICON
   (Do NOT touch position/transform of the BUTTON here — only visuals)
   ========================================================= */

/* Force icon-only look everywhere */
.emimw-sub-toggle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  /* keep usable tap area without showing a circle */
  width: 42px;
  height: 42px;

  padding: 0 !important;
  margin: 0 !important;

  color: inherit !important;

  appearance: none;
  -webkit-appearance: none;
}

/* No visual box on interaction */
.emimw-sub-toggle:hover,
.emimw-sub-toggle:active,
.emimw-sub-toggle:focus,
.emimw-sub-toggle:focus-visible {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: inherit !important;
}

/* Remove any legacy caret styles that can render a 2nd icon */
.emimw-sub-toggle__icon {
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
  padding: 0 !important;
}

/* Kill old pseudo chevrons (from older CSS versions) */
.emimw-sub-toggle__icon::before,
.emimw-sub-toggle__icon::after {
  content: none !important;
  display: none !important;
}

/* Ensure SVG shows normally */
.emimw-sub-toggle__icon svg {
  display: block;
}

/* Safety: do not allow any hardcoded colors from older CSS */
.emimw-nav__panel .emimw-sub-toggle,
.emimw-nav__panel .emimw-sub-toggle:hover,
.emimw-nav__panel .emimw-sub-toggle:focus,
.emimw-nav__panel li.emimw-sub-open > .emimw-panel-row > .emimw-sub-toggle {
  color: inherit !important;
}

/* =========================================================
   FORCE TOGGLE SVG 180° ROTATION ANIMATION (FINAL OVERRIDE)
   ========================================================= */

.emimw-sub-toggle__icon svg.emimw-sub-toggle__svg {
  transform: rotate(0deg) !important;
  transform-origin: 50% 50% !important;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
}

.emimw-nav__panel li.emimw-sub-open
  > .emimw-panel-row
  > .emimw-sub-toggle
  .emimw-sub-toggle__icon svg.emimw-sub-toggle__svg {
  transform: rotate(180deg) !important;
}