/**
 * Quick Tools — Converter Mega Menu Styles
 * Fully responsive: hover on desktop, tap-toggle on mobile/tablet.
 */

/* ──────────────────────────────────────────────────────────────────
 * Parent <li> positioning — the panel anchors to this
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-menu-parent {
	position: static !important;
	/* panel is full-width, not relative to li */
}

/* ──────────────────────────────────────────────────────────────────
 * Mega Panel — constrained width, not edge-to-edge
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-panel {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	/* set by JS from header height */
	z-index: 99900;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	/* outer left/right breathing room */
	padding: 0 20px;
}

.ag-mega-panel.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.ag-mega-panel__inner {
	background: #0d1120;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-top: none;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
	max-width: 960px;
	margin: 0 auto;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* ──────────────────────────────────────────────────────────────────
 * Header bar
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 28px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background: rgba(255, 255, 255, 0.015);
}

.ag-mega-panel__header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ag-mega-panel__logo-icon {
	font-size: 1.2rem !important;
	width: 1.2rem !important;
	height: 1.2rem !important;
	color: #e11d48;
	flex-shrink: 0;
}

.ag-mega-panel__header-title {
	font-size: 0.9rem;
	font-weight: 700;
	color: #f8fafc;
	letter-spacing: -0.01em;
}

.ag-mega-panel__header-sub {
	font-size: 0.76rem;
	color: #64748b;
	display: none;
}

@media (min-width: 640px) {
	.ag-mega-panel__header-sub {
		display: inline;
	}
}

.ag-mega-panel__header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ag-mega-panel__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #e11d48 !important;
	text-decoration: none !important;
	background: rgba(225, 29, 72, 0.08);
	border: 1px solid rgba(225, 29, 72, 0.25);
	border-radius: 6px;
	padding: 6px 12px;
	transition: background 0.18s ease, border-color 0.18s ease;
	white-space: nowrap;
}

.ag-mega-panel__cta:hover {
	background: rgba(225, 29, 72, 0.16);
	border-color: rgba(225, 29, 72, 0.5);
}

.ag-mega-panel__cta .dashicons {
	font-size: 0.85rem !important;
	width: 0.85rem !important;
	height: 0.85rem !important;
}

.ag-mega-panel__close {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	color: #94a3b8;
	cursor: pointer;
	width: 30px;
	height: 30px;
	transition: background 0.15s ease, color 0.15s ease;
	padding: 0;
}

.ag-mega-panel__close:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #f8fafc;
}

.ag-mega-panel__close .dashicons {
	font-size: 1rem !important;
	width: 1rem !important;
	height: 1rem !important;
}

/* ──────────────────────────────────────────────────────────────────
 * Category grid
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-panel__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	padding: 8px 12px;
}

@media (min-width: 640px) {
	.ag-mega-panel__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.ag-mega-panel__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ──────────────────────────────────────────────────────────────────
 * Category column
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-panel__col {
	padding: 16px 20px;
	border-right: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

@media (min-width: 640px) {
	.ag-mega-panel__col:nth-last-child(-n+2) {
		border-bottom: none;
	}
}

@media (min-width: 1024px) {
	.ag-mega-panel__col:nth-last-child(-n+2) {
		border-bottom: 1px solid rgba(255, 255, 255, 0.03); /* reset */
	}
	.ag-mega-panel__col:nth-last-child(-n+3) {
		border-bottom: none;
	}
}

/* Category heading link */
.ag-mega-panel__cat-heading {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.78rem;
	font-weight: 700;
	color: #e2e8f0 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	text-decoration: none !important;
	transition: color 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}

.ag-mega-panel__cat-heading:hover {
	color: #f8fafc !important;
	border-color: rgba(225, 29, 72, 0.4);
}

.ag-mega-panel__cat-icon {
	font-size: 0.9rem !important;
	width: 0.9rem !important;
	height: 0.9rem !important;
	color: #e11d48;
	flex-shrink: 0;
}

.ag-mega-panel__cat-arrow {
	font-size: 0.85rem !important;
	width: 0.85rem !important;
	height: 0.85rem !important;
	color: #64748b;
	margin-left: auto;
	transition: transform 0.2s ease, color 0.2s ease;
}

.ag-mega-panel__cat-heading:hover .ag-mega-panel__cat-arrow {
	transform: translateX(3px);
	color: #e11d48;
}

/* Format links list */
.ag-mega-panel__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ag-mega-panel__link {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	color: #94a3b8 !important;
	text-decoration: none !important;
	padding: 5px 8px;
	border-radius: 6px;
	transition: all 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ag-mega-panel__link::before {
	content: '•';
	color: rgba(255, 255, 255, 0.15);
	font-size: 0.8rem;
	transition: color 0.2s ease;
}

.ag-mega-panel__link:hover {
	background: rgba(225, 29, 72, 0.06);
	color: #f8fafc !important;
	transform: translateX(4px);
}

.ag-mega-panel__link:hover::before {
	color: #e11d48;
}

/* ──────────────────────────────────────────────────────────────────
 * Footer popular strip
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-panel__footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	background: rgba(255, 255, 255, 0.01);
}

.ag-mega-panel__footer-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #475569;
	margin-right: 4px;
}

.ag-mega-panel__popular-link {
	font-size: 0.72rem;
	font-weight: 500;
	color: #94a3b8 !important;
	text-decoration: none !important;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 4px;
	padding: 3px 9px;
	transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
	white-space: nowrap;
}

.ag-mega-panel__popular-link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #f1f5f9 !important;
	border-color: rgba(255, 255, 255, 0.14);
}



/* ──────────────────────────────────────────────────────────────────
 * Trigger indicator — chevron on parent item
 * ────────────────────────────────────────────────────────────────── */
.ag-mega-menu-parent>a::after {
	content: '\f140';
	/* dashicons chevron-down */
	font-family: dashicons;
	speak: never;
	font-style: normal;
	font-weight: 400;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	font-size: 0.85em;
	margin-left: 4px;
	display: inline-block;
	vertical-align: middle;
	color: currentColor;
	opacity: 0.65;
	transition: transform 0.2s ease;
}

.ag-mega-menu-parent.is-open>a::after {
	transform: rotate(180deg);
}