/**
 * Footer-list mega-menu module — internal layout only.
 *
 * Shell + row primitives come from `mega.scss`; the footer divider from the
 * shared `_mega-footer` partial. This file (shipped as
 * `build/mega-footer-list.css`, enqueued only when the variant is on) sizes the
 * boxed panel and lays the `mega-cta` items out as a plain inline link row.
 */

@use "mega-footer";

.aureon-mega--footer-list {

	/* Local alias so the feed band's edge bleed below tracks the panel padding,
	   whether that's the default or a per-variant --aureon-mega-pad override. */
	--mega-pad: var(--aureon-mega-pad, var(--aureon-space-sm));

	width: var(--aureon-mega-width, max(22rem, var(--aureon-submenu-width, 20rem)));
	max-width: calc(100vw - 2rem);
	padding: var(--mega-pad);
}

.aureon-mega__footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0;
	padding: 0 0.75rem;
	list-style: none;
}

.aureon-mega__footer-item {
	margin: 0;
}

/* Scoped under `.aureon-mega` so it beats `.aureon-menu a` (0,1,1), which
   would otherwise re-impose the top-nav anchor's display and padding. */
.aureon-mega .aureon-mega__footer-link {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 500;
	color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 70%, transparent);
	text-decoration: none;

	&:hover,
	&:focus-visible {
		color: var(--aureon-menu-link-hover, var(--aureon-color-link));
		text-decoration: underline;
	}
}

/* "Recent posts" panel: a tinted band spanning the panel's inner padding, with a
   heading + "See all" row above dated title links. The negative margins bleed the
   band to the panel edges, then its own padding restores the inset so the tint
   reads as a distinct footer section (the Tailwind Plus stacked footer). */
.aureon-mega__footer--feed {
	margin: var(--aureon-space-sm) calc(-1 * var(--mega-pad, var(--aureon-space-sm))) calc(-1 * var(--mega-pad, var(--aureon-space-sm)));
	padding: var(--aureon-space-sm) calc(var(--mega-pad, var(--aureon-space-sm)) + 0.75rem) var(--aureon-space-md, 1.25rem);
	border-top: 0;
	border-radius: 0 0 var(--aureon-mega-radius, var(--aureon-radius-md, 0.5rem)) var(--aureon-mega-radius, var(--aureon-radius-md, 0.5rem));
	background: color-mix(in srgb, var(--aureon-color-border) 22%, transparent);
}

.aureon-mega__feed-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.aureon-mega__feed-title {
	font-size: 0.8125rem;
	font-weight: 600;
	color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 70%, transparent);
}

.aureon-mega .aureon-mega__feed-seeall {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--aureon-menu-link-hover, var(--aureon-color-link));
	text-decoration: none;

	&:hover,
	&:focus-visible {
		text-decoration: underline;
	}
}

.aureon-mega__feed-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aureon-mega__feed-item {
	margin: 0;
}

/* Scoped under `.aureon-mega` (0,2,0) so it beats the top-nav
   `.aureon-menu a { display: inline-block }` — otherwise date and title would
   flow onto one line instead of stacking. */
.aureon-mega .aureon-mega__feed-link {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	text-decoration: none;

	&:hover .aureon-mega__feed-name,
	&:focus-visible .aureon-mega__feed-name {
		color: var(--aureon-menu-link-hover, var(--aureon-color-link));
	}
}

.aureon-mega__feed-date {
	font-size: 0.8125rem;
	color: color-mix(in srgb, var(--aureon-submenu-text, var(--aureon-color-text)) 55%, transparent);
}

.aureon-mega__feed-name {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--aureon-submenu-text, var(--aureon-color-text));
}
