/* ============================================================
   Header Menu Styling and Icons
   (moved out of style.css → loaded by inc/menu-icons.php)

   Top-level menu items are intentionally icon-free; icons only
   appear on dropdown (sub-menu) items and the account dropdown.
   ============================================================ */

/* Base styles for all menu links with icons */
.menu .ct-menu-link,
.mobile-menu .ct-menu-link {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
}

/* Icon base styles */
.menu .ct-menu-link .menu-icon,
.mobile-menu .ct-menu-link .menu-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-right: 5px; /* Fallback for browsers that don't support gap well */
  fill: currentColor;
  stroke: currentColor;
  vertical-align: middle;
  pointer-events: none;
}

.ct-header-account-dropdown .ct-menu-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.ct-header-account-dropdown .menu-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  vertical-align: middle;
}

/* Ensure user info section doesn't get icons */
.ct-header-account-user-info .ct-menu-link {
  gap: 12px;
}

/* Make sure the media container (avatar) stays properly aligned */
.ct-header-account-user-info .ct-media-container {
  flex-shrink: 0;
}

/* Mobile-specific fixes */
@media (max-width: 999px) {
  .mobile-menu .ct-menu-link {
    display: flex !important;
    gap: 10px; /* Slightly larger gap on mobile for better touch targets */
  }

  .mobile-menu .ct-menu-link .menu-icon {
    margin-right: 10px;
  }

  /* Ensure sub-menu items also get proper spacing */
  .mobile-menu .sub-menu .ct-menu-link {
    padding-left: 20px;
  }
}

/* Desktop enhancements */
@media (min-width: 1000px) {
  .menu .ct-menu-link .menu-icon {
    width: 20px;
    height: 20px;
  }
}

/* Ensure dropdown toggles don't interfere with icon spacing */
.ct-sub-menu-parent {
  display: flex;
  align-items: center;
  width: 100%;
}

.ct-sub-menu-parent .ct-menu-link {
  flex: 1;
}
