/**
 * Highlight animation for the VisitorLens entry in the WP admin sidebar menu.
 * Loaded globally (all admin pages) since the sidebar itself is global —
 * unlike the rest of admin/css/*, this isn't gated to VisitorLens screens.
 * Colors match the brand gradient used across admin.css (--vsr-accent -> #f97316).
 */

#toplevel_page_visitorlens > a .wp-menu-image {
    position: relative;
}

#toplevel_page_visitorlens > a .wp-menu-image:before {
    position: relative;
    z-index: 1;
    transition: transform .2s ease, color .2s ease;
}

#toplevel_page_visitorlens:hover > a .wp-menu-image:before,
#toplevel_page_visitorlens.wp-has-current-submenu > a .wp-menu-image:before,
#toplevel_page_visitorlens.current > a .wp-menu-image:before {
    transform: scale(1.12);
}

/* Soft breathing glow behind the icon */
#toplevel_page_visitorlens > a .wp-menu-image:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(.85);
    background: radial-gradient(circle, rgba(245, 158, 11, .55) 0%, rgba(249, 115, 22, 0) 70%);
    animation: vlens-menu-glow 2.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes vlens-menu-glow {
    0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.85); }
    50%      { opacity: .9;  transform: translate(-50%, -50%) scale(1.15); }
}

/* Small pulsing "live" dot next to the label */
#toplevel_page_visitorlens .wp-menu-name::after {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-left: 10px;
	margin-bottom: 1px;
	border-radius: 50%;
	background: linear-gradient(135deg, #f59e0b, #f97316);
	vertical-align: middle;
	animation: vlens-dot-pulse 2s ease-in-out infinite;
}

@keyframes vlens-dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 159, 11, 0.671); }
    50%      { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
}

/* Menu is folded to icon-only (auto-fold / manually collapsed) — label is
   hidden by core, so drop its pulse dot along with it. */
.folded #toplevel_page_visitorlens .wp-menu-name:after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    #toplevel_page_visitorlens > a .wp-menu-image:after,
    #toplevel_page_visitorlens .wp-menu-name:after {
        animation: none;
    }
}
