/**
 * SnapWeb Community footer module.
 *
 * Owns the FCom SPA/wrapper footer presentation for the Community plugin.
 */

body.snapweb-community-footer-mounted :where(footer.site-footer, .wp-block-template-part.site-footer):has(.snapweb-shell-footer[data-snapweb-fcom-footer]) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.snapweb-community-footer-mounted .snapweb-fcom-content :where(footer) {
	display: none !important;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] {
	box-sizing: border-box;
	clear: both;
	width: 100%;
	margin: 0;
	border-top: 1px solid var(--fcom-border-color, var(--snapweb-community-sidebar-border, #e5e7eb)) !important;
	background: var(--fcom-primary-bg, var(--snapweb-community-sidebar-bg, #fff)) !important;
	color: var(--fcom-secondary-text, var(--snapweb-community-sidebar-muted, #334155)) !important;
	font-family: var(--snapweb-body-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif) !important;
	font-size: var(--snapweb-base-font-size, 16px);
	position: relative;
	z-index: 5;
}

body.snapweb-fcom-native-shell .snapweb-shell-footer[data-snapweb-fcom-footer] {
	border-top: 0 !important;
	box-shadow: none !important;
}

.snapweb-shell-footer[data-snapweb-fcom-footer],
.snapweb-shell-footer[data-snapweb-fcom-footer] *,
.snapweb-shell-footer[data-snapweb-fcom-footer] *::before,
.snapweb-shell-footer[data-snapweb-fcom-footer] *::after {
	box-sizing: border-box;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] :where(*:not(svg):not(path):not(use):not(i):not([class*="icon"]):not([class*="Icon"]):not([class*="dashicon"]):not([class*="dashicons"])) {
	font-family: inherit !important;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	align-items: center;
	display: grid;
	gap: 18px 32px;
	grid-template-columns: minmax(220px, 1fr) auto;
	max-width: 1480px;
	margin: 0 auto;
	padding: 28px clamp(24px, 4vw, 72px);
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__brand {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 0;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__brand-copy {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__logo {
	align-items: center;
	border-radius: 12px;
	display: inline-flex;
	flex: 0 0 auto;
	height: 42px;
	justify-content: center;
	text-decoration: none;
	width: 42px;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__logo-img {
	display: block;
	height: auto;
	max-height: 42px;
	max-width: 42px;
	object-fit: contain;
	width: auto;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__title {
	color: var(--fcom-primary-text, var(--snapweb-community-sidebar-text, #0f172a));
	font-family: var(--snapweb-heading-font-family, inherit) !important;
	font-size: 18px;
	font-weight: var(--snapweb-heading-font-weight, 700);
	line-height: 1.2;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__tagline {
	margin: 0;
	color: inherit;
	font-size: 14px;
	line-height: 1.45;
	opacity: .82;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	justify-content: flex-end;
	min-width: 0;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__nav a {
	color: inherit;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__nav a:hover,
.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__nav a:focus-visible {
	color: var(--fcom-primary-text, currentColor);
	outline: none;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__copy {
	align-items: baseline;
	border-top: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	grid-column: 1 / -1;
	line-height: 1.45;
	margin: 0;
	opacity: .78;
	padding-top: 10px;
	font-size: 13px;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__legal-icon {
	font-weight: 700;
	line-height: 1;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__legal-brand {
	align-items: flex-start;
	display: inline-flex;
	gap: 1px;
	font-weight: 500;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__legal-mark {
	font-size: .68em;
	font-weight: 700;
	line-height: 1;
	margin-left: 1px;
	position: relative;
	top: -.22em;
}

.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__legal-rights {
	margin-left: 3px;
}

.snapweb-shell-footer--social-centered[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
.snapweb-shell-footer--social-legal[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	grid-template-columns: minmax(0, 1fr);
}

.snapweb-shell-footer--social-centered[data-snapweb-fcom-footer] .snapweb-shell-footer__brand,
.snapweb-shell-footer--social-centered[data-snapweb-fcom-footer] .snapweb-shell-footer__copy {
	justify-content: center;
	text-align: center;
}

.snapweb-shell-footer--social-centered[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	justify-content: center;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	grid-template-columns: minmax(220px, 1fr) auto;
	padding-top: 20px;
	padding-bottom: 20px;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__tagline,
.snapweb-shell-footer--social-legal[data-snapweb-fcom-footer] .snapweb-shell-footer__brand,
.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__tagline {
	display: none;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
.snapweb-shell-footer--social-legal[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	justify-content: flex-start;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__copy,
.snapweb-shell-footer--social-legal[data-snapweb-fcom-footer] .snapweb-shell-footer__copy {
	padding-top: 12px;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__logo,
.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__logo {
	border-radius: 10px;
	height: 32px;
	width: 32px;
}

.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__logo-img,
.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__logo-img {
	max-height: 32px;
	max-width: 32px;
}

.snapweb-shell-footer--community-hub[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	gap: 22px 44px;
	padding-top: 40px;
	padding-bottom: 34px;
}

.snapweb-shell-footer--community-hub[data-snapweb-fcom-footer] .snapweb-shell-footer__title {
	font-size: 20px;
}

.snapweb-shell-footer--community-hub[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	gap: 10px 24px;
}

.snapweb-shell-footer--community-columns[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	align-items: start;
	gap: 20px 56px;
	grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.15fr);
}

.snapweb-shell-footer--community-columns[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	display: grid;
	gap: 10px 28px;
	grid-template-columns: repeat(2, minmax(120px, 1fr));
	justify-content: stretch;
}

.snapweb-shell-footer--community-stack[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	align-items: start;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr);
}

.snapweb-shell-footer--community-stack[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	justify-content: flex-start;
}

.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
	gap: 14px 24px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	padding-top: 18px;
	padding-bottom: 18px;
}

.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__title {
	font-size: 15px;
}

.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	justify-content: center;
}

.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__copy {
	border-top: 0;
	grid-column: auto;
	padding-top: 0;
	text-align: right;
}

.snapweb-shell-footer--link-cols-1[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
.snapweb-shell-footer--link-cols-2[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
.snapweb-shell-footer--link-cols-3[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	display: grid;
	justify-content: stretch;
}

.snapweb-shell-footer--link-cols-1[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	grid-template-columns: minmax(0, 1fr);
}

.snapweb-shell-footer--link-cols-2[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.snapweb-shell-footer--link-cols-3[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
	grid-template-columns: repeat(3, minmax(100px, 1fr));
}

@media (min-width: 1025px) {
	body.snapweb-context-fcom-wrapper:not(.snapweb-fcom-native-shell),
	body.snapweb-has-fluentcommunity-wrapper:not(.snapweb-fcom-native-shell) {
		--snapweb-shell-footer-sidebar-offset: var(--snapweb-fcom-sidebar-current-width, 280px);
	}

	body.snapweb-context-fcom-native,
	body.snapweb-fcom-native-shell {
		--snapweb-shell-footer-sidebar-offset: var(--snapweb-fcom-sidebar-current-width, 72px);
	}

	body.snapweb-context-fcom-wrapper:not(.snapweb-fcom-native-shell) .snapweb-shell-footer[data-snapweb-fcom-footer],
	body.snapweb-has-fluentcommunity-wrapper:not(.snapweb-fcom-native-shell) .snapweb-shell-footer[data-snapweb-fcom-footer],
	body.snapweb-context-fcom-native .snapweb-shell-footer[data-snapweb-fcom-footer],
	body.snapweb-fcom-native-shell .snapweb-shell-footer[data-snapweb-fcom-footer] {
		clear: none;
		display: block;
		height: auto;
		line-height: normal;
		margin: 0 0 0 var(--snapweb-shell-footer-sidebar-offset);
		max-width: none;
		min-height: 0;
		padding: 0;
		width: calc(100% - var(--snapweb-shell-footer-sidebar-offset));
	}

	body.snapweb-context-fcom-wrapper:not(.snapweb-fcom-native-shell) .snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	body.snapweb-has-fluentcommunity-wrapper:not(.snapweb-fcom-native-shell) .snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	body.snapweb-context-fcom-native .snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	body.snapweb-fcom-native-shell .snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
		align-items: center;
		display: grid;
		gap: 14px 24px;
		grid-template-columns: auto minmax(0, 1fr) auto;
		margin: 0;
		max-width: none;
		min-height: 0;
		padding: 18px clamp(24px, 3vw, 48px);
		width: 100%;
	}
}

@media (max-width: 780px) {
	.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	.snapweb-shell-footer--community-columns[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__inner,
	.snapweb-shell-footer--social-compact[data-snapweb-fcom-footer] .snapweb-shell-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.snapweb-shell-footer[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
	.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
		justify-content: flex-start;
	}

	.snapweb-shell-footer--community-columns[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
	.snapweb-shell-footer--link-cols-2[data-snapweb-fcom-footer] .snapweb-shell-footer__nav,
	.snapweb-shell-footer--link-cols-3[data-snapweb-fcom-footer] .snapweb-shell-footer__nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.snapweb-shell-footer--community-strip[data-snapweb-fcom-footer] .snapweb-shell-footer__copy {
		grid-column: 1 / -1;
		text-align: left;
	}
}
