/*
 * Site-wide footer: brand, legal navigation and the accepted payment
 * methods (FOOTER-1, alpha.50). Loaded only when at least one published
 * compliance page has been selected in wp-admin.
 *
 * Two looks: plain (legal pages, or no photo configured) and
 * `.rso-legal-footer--photo`, which lays the text over the entry page's
 * food photo behind a green-black veil — the same picture guests saw on
 * the landing screen. Colours: brand green / white / black.
 */
.rso-legal-footer {
	box-sizing: border-box;
	width: 100%;
	border-top: 1px solid #e8e1d2;
	background: #f6f7f1;
	color: #241a10;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.45;
	--rso-footer-ink: #241a10;
	--rso-footer-muted: #5e5347;
	--rso-footer-link: #4f4336;
	--rso-footer-link-hover: #35800a;
	--rso-footer-rule: rgba(36, 26, 16, 0.12);
	--rso-footer-chip: #fff;
	--rso-footer-chip-border: #e8e1d2;
}

.rso-legal-footer--photo {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-top: 0;
	background-color: #0c1407;
	color: #f6f3ea;
	--rso-footer-ink: #f6f3ea;
	--rso-footer-muted: rgba(246, 243, 234, 0.72);
	--rso-footer-link: rgba(246, 243, 234, 0.9);
	--rso-footer-link-hover: #a4e26a;
	--rso-footer-rule: rgba(255, 255, 255, 0.16);
	--rso-footer-chip: rgba(255, 255, 255, 0.96);
	--rso-footer-chip-border: transparent;
}

/* The photo, then a veil that keeps the text readable: nearly clear at
   the top so the food shows through, solid green-black at the bottom. */
.rso-legal-footer--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--rso-footer-photo) center / cover no-repeat;
	transform: scale(1.03);
}

.rso-legal-footer--photo::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(8, 14, 5, 0.58) 0%, rgba(8, 14, 5, 0.8) 45%, rgba(6, 12, 4, 0.94) 100%);
}

.rso-legal-footer__inner {
	box-sizing: border-box;
	max-width: 1180px;
	margin: 0 auto;
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* FOOTER-3 (alpha.56): one slim line — company | street | town | phone on
   the left, Impressum | AGB | Datenschutz on the right, same baseline. */
.rso-legal-footer__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 24px;
}

.rso-legal-footer__identity,
.rso-legal-footer__nav {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	font-size: .875rem;
	font-weight: 600;
	color: var(--rso-footer-ink);
	line-height: 1.5;
}

.rso-legal-footer__nav {
	justify-content: flex-end;
	margin-left: auto;
}

.rso-legal-footer__identity a,
.rso-legal-footer__nav a {
	color: var(--rso-footer-ink);
	text-decoration: none;
}

.rso-legal-footer__identity a:hover,
.rso-legal-footer__identity a:focus-visible,
.rso-legal-footer__nav a:hover,
.rso-legal-footer__nav a:focus-visible {
	color: var(--rso-footer-link-hover);
	text-decoration: none;
}

.rso-legal-footer__nav a:focus-visible,
.rso-legal-footer__identity a:focus-visible {
	border-radius: 3px;
	outline: 3px solid #46a500;
	outline-offset: 3px;
}

.rso-legal-footer__sep {
	color: var(--rso-footer-muted);
	font-weight: 400;
	opacity: .8;
}

/* Payment methods ------------------------------------------------------- */
.rso-legal-footer__pay {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
}

.rso-legal-footer__pay-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.rso-legal-footer__pay-item {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 36px;
	padding: 5px;
	border-radius: 8px;
	background: var(--rso-footer-chip);
	border: 1px solid var(--rso-footer-chip-border);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* FOOTER-2: one chip size for every mark — Wallee's brand images have
   different proportions (a square Amex, a wide Visa), so each sits
   centred inside the same box, never wider than 52 px nor taller than 28. */
.rso-legal-footer__pay-item img {
	display: block;
	width: auto;
	height: auto;
	max-width: 46px;
	max-height: 24px;
	object-fit: contain;
}

.rso-legal-footer__pay-item--text {
	width: auto;
	padding: 5px 10px;
}

.rso-legal-footer__pay-text {
	font-size: .8125rem;
	font-weight: 700;
	color: #241a10;
	white-space: nowrap;
}

@media (max-width: 720px) {
	.rso-legal-footer__inner {
		padding: 14px 16px 16px;
		gap: 10px;
		text-align: center;
	}

	.rso-legal-footer__row {
		flex-direction: column;
		align-items: center;
		gap: 4px;
	}

	.rso-legal-footer__identity,
	.rso-legal-footer__nav {
		justify-content: center;
		margin-left: 0;
	}

	.rso-legal-footer__pay,
	.rso-legal-footer__pay-list {
		justify-content: center;
	}
}

@media (prefers-color-scheme: dark) {
	.rso-legal-footer:not(.rso-legal-footer--photo) {
		border-top-color: #3a2d1d;
		background: #18130d;
		color: #f3ecdf;
		--rso-footer-ink: #f3ecdf;
		--rso-footer-muted: #b8ab97;
		--rso-footer-link: #c7b9a4;
		--rso-footer-link-hover: #8ed95e;
		--rso-footer-rule: rgba(255, 255, 255, 0.14);
		--rso-footer-chip: #f6f3ea;
		--rso-footer-chip-border: transparent;
	}

}

@media (prefers-reduced-motion: no-preference) {
	.rso-legal-footer__pay-item {
		transition: transform .15s ease;
	}

	.rso-legal-footer__pay-item:hover {
		transform: translateY(-1px);
	}
}

/* FOOTER-4 (alpha.57): while the storefront's floating "View basket" bar
   is up (phones, basket not empty) the footer is not shown at all — the
   guest is ordering, and a footer under the bar only makes the page
   longer. The body class is set by storefront.js; :has() covers the
   moment before the script runs. */
@media (max-width: 979px) {
	body.rso-basket-bar .rso-legal-footer,
	body:has(#rso-storefront .rso-mobile-bar:not([hidden])) .rso-legal-footer {
		display: none;
	}
}
