/**
 * Site footer (Figma V17 @1440).
 * Left: phone, hours, address, then legal links + ©. Right: four icon links.
 * Below 782px (Figma mobile preview): text centred, then the four icons in one row.
 */

.chasmg-footer__bar {
	gap: var(--wp--preset--spacing--40);
}

.chasmg-footer__info {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Legal links + copyright: small, separated by thin bars. */
.chasmg-footer__legal {
	gap: 0 !important;
	font-size: var(--wp--preset--font-size--xx-small);
	letter-spacing: 0.08em;
}

.chasmg-footer__legal .wp-block-navigation {
	gap: 0;
	font-size: inherit;
}

.chasmg-footer__legal .wp-block-navigation-item + .wp-block-navigation-item::before {
	content: "|";
	margin-inline: 0.9rem;
}

.chasmg-footer .chasmg-copyright {
	margin: 0;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: inherit;
}

/* "| ©" before the site name (the name comes from Settings → General). */
.chasmg-footer .chasmg-copyright::before {
	content: "|\00a0\00a0\00a0©";
	margin-inline: 0.9rem 0.1rem;
}

.chasmg-footer__legal .wp-block-navigation-item__content {
	text-decoration: none;
}

.chasmg-footer__legal .wp-block-navigation-item__content:hover,
.chasmg-footer__legal .wp-block-navigation-item__content:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

@media (max-width: 781px) {

	.chasmg-footer__bar {
		flex-direction: column;
		align-items: stretch !important;
	}

	.chasmg-footer__info {
		align-items: center;
		text-align: center;
	}

	.chasmg-footer__legal {
		justify-content: center;
	}

	.chasmg-footer .wp-block-chasmg-quick-links__list {
		justify-content: space-between;
		gap: 1rem 0.5rem;
	}

	.chasmg-footer .wp-block-chasmg-quick-links__icon {
		width: 48px;
		height: 48px;
	}

	.chasmg-footer .wp-block-chasmg-quick-links__icon svg {
		width: 44px;
		height: 44px;
	}

	.chasmg-footer .wp-block-chasmg-quick-links__label {
		font-size: var(--wp--preset--font-size--xx-small);
	}
}

/* Back-to-top button (pink round, bottom right). */
.chasmg-to-top {
	position: fixed;
	right: max(var(--chasmg-gutter), env(safe-area-inset-right));
	bottom: max(1.25rem, env(safe-area-inset-bottom));
	z-index: 90;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--highlight);
	color: #fff;
	box-shadow: 0 2px 10px rgb(0 0 0 / 0.12);
	cursor: pointer;
	transition: transform var(--wp--custom--motion--duration) var(--wp--custom--motion--easing);
}

.chasmg-to-top[hidden] {
	display: none;
}

.chasmg-to-top:hover {
	transform: translateY(-2px);
}

@media (min-width: 782px) {

	.chasmg-to-top {
		width: 52px;
		height: 52px;
	}
}
