/**
 * Footer: the flyer's back.
 *
 * Black ground by default (the operator's footer colour), widget columns
 * ruled off, small type, and a bottom line with the credits.
 * Reads the plugin's tokens.
 */

.modern-footer {
	margin-top: auto;
	background: var(--foodmaster-footer-bg, var(--fm-black));
	color: var(--foodmaster-footer-text, var(--fm-paper));
	border-top: var(--fm-rule-strong);
	font-size: 15px;
}

.footer-content {
	padding: calc(var(--fm-m) * 6) 0 calc(var(--fm-m) * 4);
}

.footer-row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: calc(var(--fm-m) * 4);
}

.footer-section {
	min-width: 0;
}

.footer-section:empty {
	display: none;
}

.footer-section .widget {
	margin: 0 0 calc(var(--fm-m) * 3);
}

.footer-section .widget:last-child {
	margin-bottom: 0;
}

.footer-section h4,
.footer-section h6,
.footer-section .widget-title {
	margin: 0 0 var(--fm-m);
	padding: 0 0 var(--fm-m);
	border-bottom: 1.5px solid currentColor;
	font-family: var(--fm-font-display);
	font-weight: var(--fm-display-weight);
	font-size: 18px;
	line-height: 1;
	letter-spacing: calc(0.03em * var(--fm-tracking));
	text-transform: var(--fm-caps);
	color: inherit;
}

.footer-section h4.footer-title::after,
.footer-section h6::after {
	display: none;
}

.footer-section p {
	margin: 0 0 var(--fm-m);
	max-width: 36ch;
}

.footer-section ul,
.footer-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-section ul li,
.footer-links li {
	margin: 0;
	padding: 6px 0;
	border-bottom: 1px solid color-mix(in oklab, currentColor 18%, transparent);
}

.footer-section ul li:last-child,
.footer-links li:last-child {
	border-bottom: 0;
}

.footer-section a,
.footer-links li a {
	color: inherit;
	text-decoration: none;
	transition: opacity var(--fm-fast) var(--fm-ease);
}

.footer-section a:hover,
.footer-links li a:hover {
	color: inherit;
	opacity: 0.75;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer-brand img {
	max-width: var(--foodmaster-logo-width, 180px);
	height: auto;
}

.contact-info,
.footer-section .contact-info {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-item,
.footer-section .contact-item {
	display: flex;
	align-items: flex-start;
	gap: var(--fm-m);
}

.contact-icon,
.footer-section .contact-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: inherit;
}

.footer-social,
.footer-section .footer-social {
	display: flex;
	gap: var(--fm-m);
	margin: var(--fm-m) 0 0;
}

.footer-social .social-link,
.footer-section .footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--fm-m) * 5);
	height: calc(var(--fm-m) * 5);
	border: 1.5px solid currentColor;
	border-radius: var(--fm-radius);
	color: inherit;
	text-decoration: none;
}

.footer-section .footer-social a:hover {
	opacity: 0.75;
}

/* Bottom line */
.footer-bottom {
	border-top: 1.5px solid color-mix(in oklab, currentColor 30%, transparent);
}

.footer-bottom-content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--fm-m) calc(var(--fm-m) * 3);
	min-height: calc(var(--fm-m) * 7);
	padding: var(--fm-m) 0;
}

.footer-bottom-content p {
	margin: 0;
	font-size: 13px;
	letter-spacing: calc(0.02em * var(--fm-tracking));
}

.footer-bottom-left a {
	color: inherit;
	text-decoration: none;
}

.footer-bottom-left a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer-bottom-right {
	text-align: end;
}

.footer-bottom-menu {
	padding: 0 0 var(--fm-m);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fm-m) calc(var(--fm-m) * 2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu li a {
	color: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: calc(0.04em * var(--fm-tracking));
	text-transform: var(--fm-caps);
	text-decoration: none;
}

.footer-menu li a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 1024px) {
	.footer-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.footer-content {
		padding: calc(var(--fm-m) * 4) 0 calc(var(--fm-m) * 3);
	}

	.footer-row {
		grid-template-columns: minmax(0, 1fr);
		gap: calc(var(--fm-m) * 3);
	}

	.footer-bottom-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-bottom-right {
		text-align: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.footer-section a,
	.footer-links li a {
		transition: none;
	}
}
