/**
 * pcseal-child: accessible focus styles + click-toggle support for the
 * mega menu defined in header.php / style.css.
 */

/* ── Open state (JS-driven) ────────────────────────────────────────────── */
.pcseal-megamenu.is-open {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

/* ── Menu toggle button ──────────────────────────────────────────────────── */
.pcseal-menu-toggle {
	position: relative;
	overflow: hidden;
	transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
}
.pcseal-menu-toggle:hover {
	transform: translateY(-1px);
	box-shadow: var(--glow-blue-soft, 0 4px 14px rgba(41,50,78,.35));
}
.pcseal-menu-toggle:active {
	transform: translateY(0) scale(.97);
}

/* ── "Ripple" effect on toggle (animates once per click) ───────────────── */
.pcseal-menu-toggle .ripple {
	position: absolute;
	border-radius: 50%;
	background: rgba(255,255,255,.25);
	transform: scale(0);
	animation: menu-ripple .5s ease-out forwards;
	pointer-events: none;
}
@keyframes menu-ripple {
	to { transform: scale(4); opacity: 0; }
}

/* ── Mega menu slide + fade ──────────────────────────────────────────────── */
.pcseal-megamenu {
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
	pointer-events: none;

	/* Keep !important-free originals in style.css, override here */
	display: block !important;
}

/* ── Menu items stagger ──────────────────────────────────────────────────── */
.pcseal-megamenu.is-open li {
	animation: menu-stagger-in .35s ease both;
}
.pcseal-megamenu.is-open li:nth-child(1)  { animation-delay: 0.00s; }
.pcseal-megamenu.is-open li:nth-child(2)  { animation-delay: 0.03s; }
.pcseal-megamenu.is-open li:nth-child(3)  { animation-delay: 0.06s; }
.pcseal-megamenu.is-open li:nth-child(4)  { animation-delay: 0.09s; }
.pcseal-megamenu.is-open li:nth-child(5)  { animation-delay: 0.12s; }
.pcseal-megamenu.is-open li:nth-child(6)  { animation-delay: 0.15s; }
.pcseal-megamenu.is-open li:nth-child(7)  { animation-delay: 0.18s; }
.pcseal-megamenu.is-open li:nth-child(8)  { animation-delay: 0.21s; }
.pcseal-megamenu.is-open li:nth-child(9)  { animation-delay: 0.24s; }
.pcseal-megamenu.is-open li:nth-child(10) { animation-delay: 0.27s; }

@keyframes menu-stagger-in {
	from {
		opacity: 0;
		transform: translateX(-12px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ── Accessible focus styles ─────────────────────────────────────────────── */
.pcseal-menu-toggle:focus-visible {
	outline: 2px solid var(--gold, #ff7a45);
	outline-offset: 2px;
}
.pcseal-megamenu li a:focus-visible {
	outline: 2px solid var(--accent, #29a3ff);
	outline-offset: -2px;
	background: var(--accent-tint, rgba(41, 163, 255, 0.14));
}
