/* Cached theme menus can omit the class added by the WordPress menu filter. */
.new-header .sc_layouts_menu_dir_horizontal .sc_layouts_menu_nav > li:is(.tgem-giveaways-menu, :has(> a:is([href$="/current-giveaways"], [href$="/current-giveaways/"]))) {
	--tgem-menu-inset: 12px;
	position: relative;

	& > .sub-menu {
		left: 0 !important;
		right: auto !important;
		margin-left: 0 !important;
		width: max-content !important;
		min-width: 100%;
	}
	& > a,
	& > .sub-menu > li > a {
		padding-left: var(--tgem-menu-inset);
	}
	& > .sub-menu > .sc_layouts_menu_stretch_bg {
		left: 0 !important;
		right: 0 !important;
		box-shadow: 0 0 0 100vmax #000;
		clip-path: inset(0 -100vmax);
		pointer-events: none;
	}
}

/* The theme offsets Shop's panel to align its links. Extend just its black backdrop. */
.new-header .sc_layouts_menu_dir_horizontal .sc_layouts_menu_nav > li:has(> a:is([href$="/shop/best-sellers/"], [href$="/shop/best-sellers"])) > .sub-menu > .sc_layouts_menu_stretch_bg {
	box-shadow: 0 0 0 100vmax #000;
	clip-path: inset(0 -100vmax);
}

/* Use the same always-open phone layout as the Shop submenu. */
@media (max-width: 767px) {
	.menu_mobile_nav > li:is(.tgem-giveaways-menu, :has(> a:is([href$="/current-giveaways"], [href$="/current-giveaways/"]))) > .sub-menu {
		display: block !important;
	}
}

.new-header .sc_layouts_menu_nav > li:is(.tgem-giveaways-menu, :has(> a:is([href$="/current-giveaways"], [href$="/current-giveaways/"]))) {
	&:is(:hover, :focus-within, .sfHover, .current-menu-item, .current-menu-ancestor, .tgem-giveaways-selected, :has([aria-current="page"], .current-menu-item)) > a,
	& .sub-menu > li:is(:hover, :focus-within, .current-menu-item, .tgem-giveaways-selected) > a {
		color: #a2dca6 !important;
		text-decoration: underline !important;
	}
	& a > :is(span, .menu-item-icon) {
		color: inherit;
	}
}
