/*
Theme Name: Döner Royal
Theme URI: https://nb-royal.de
Author: Giantrex
Description: Custom block theme for Döner Royal Leipzig – royal red, gold accents, mobile-first with a bottom action bar.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.2
Version: 0.4.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: royal-theme
*/

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

:where(a, button, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Press feedback on tappable elements. */
.wp-block-button__link,
.royal-action-bar__item {
	transition: transform 120ms ease, background-color 160ms ease, color 160ms ease;
}

.wp-block-button__link:active,
.royal-action-bar__item:active {
	transform: scale(0.96);
}

/* Template parts sit flush – no block-gap strips between header,
 * main and footer. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Live status dot (header, footer, branch cards, Speisekarte). */
.royal-status-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #b32d2e;
	flex: none;
}

.royal-status-dot.is-open {
	background: #1a7f37;
	box-shadow: 0 0 0 4px rgba(26, 127, 55, 0.15);
}

.royal-live {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

/* Brighter status colors on the dark header/footer. */
:is(.royal-header, .royal-footer) .royal-status-dot {
	width: 8px;
	height: 8px;
	background: #f87171;
}

:is(.royal-header, .royal-footer) .royal-status-dot.is-open {
	background: #4ade80;
	box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

/* ---------------------------------------------------------------------------
 * Header: top bar with live status, sticky bar that turns compact on
 * scroll. On the Startseite it floats transparent over the hero.
 * ------------------------------------------------------------------------- */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 90;
}

/* The Speisekarte has its own sticky category bar – header scrolls away. */
body:has(.royal-catnav) .wp-site-blocks > header.wp-block-template-part {
	position: relative;
}

.royal-header {
	background-color: var(--wp--preset--color--maroon);
	transition: background-color 300ms ease, box-shadow 300ms ease;
}

html.royal-scrolled .royal-header {
	box-shadow: 0 12px 32px -12px rgba(20, 4, 8, 0.55);
}

/* Startseite: overlay the hero. Fixed only with JS (which turns it solid
 * on scroll); without JS it is absolute and simply scrolls away. */
body.home .wp-site-blocks > header.wp-block-template-part {
	position: absolute;
	inset-inline: 0;
}

html.royal-js body.home .wp-site-blocks > header.wp-block-template-part {
	position: fixed;
}

body.home .royal-header {
	background-color: transparent;
	background-image: linear-gradient(180deg, rgba(20, 4, 8, 0.6) 0%, rgba(20, 4, 8, 0) 100%);
}

html.royal-scrolled body.home .royal-header {
	background-color: rgba(78, 20, 30, 0.9);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
}

/* Top bar */
.royal-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-height: 3rem;
	padding-block: 0.45rem;
	padding-inline: max(var(--wp--preset--spacing--40), calc((100% - var(--wp--style--global--wide-size)) / 2));
	border-bottom: 1px solid rgba(235, 194, 63, 0.16);
	font-size: 0.8125rem;
	overflow: hidden;
	transition: max-height 300ms ease, padding 300ms ease, opacity 200ms ease, border-color 300ms ease;
}

html.royal-scrolled .royal-topbar {
	max-height: 0;
	padding-block: 0;
	opacity: 0;
	border-color: transparent;
}

.royal-topbar__claim {
	margin: 0;
	color: var(--wp--preset--color--gold);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.royal-topbar__branches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.royal-topbar__branches a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: rgba(252, 246, 226, 0.85);
	text-decoration: none;
	transition: color 150ms ease;
}

.royal-topbar__branches a:hover {
	color: var(--wp--preset--color--gold);
}

.royal-topbar__branches strong {
	color: var(--wp--preset--color--cream);
	font-weight: 700;
}

@media (max-width: 781px) {
	.royal-topbar {
		justify-content: center;
		font-size: 0.75rem;
	}

	.royal-topbar__claim {
		display: none;
	}

	.royal-topbar__branches {
		justify-content: center;
		gap: 0.25rem 0.9rem;
		font-size: 0.7rem;
	}

	.royal-topbar__branches a {
		gap: 0.35rem;
	}
}

/* Main bar */
.royal-header__bar {
	padding-block: 0.9rem;
	transition: padding 300ms ease;
}

html.royal-scrolled .royal-header__bar {
	padding-block: 0.55rem;
}

.royal-header .wp-block-site-logo img {
	transition: transform 300ms ease;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

html.royal-scrolled .royal-header .wp-block-site-logo img {
	transform: scale(0.86);
}

.royal-header .wp-block-site-title {
	font-size: 1.4rem;
	line-height: 1.1;
}

.royal-header .wp-block-site-tagline {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
}

/* Nav links: cream, animated gold underline, gold for the current page. */
.royal-header .wp-block-navigation {
	font-size: 0.98rem;
}

header .wp-block-navigation a:where(:not(.wp-element-button)) {
	position: relative;
	padding: 0.5rem 0.85rem;
	transition: color 140ms ease, background-color 140ms ease;
}

header .wp-block-navigation a:where(:not(.wp-element-button)):hover,
header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--gold);
}

@media (min-width: 782px) {
	header .wp-block-navigation a:not([href^="/speisekarte"])::after {
		content: "";
		position: absolute;
		left: 0.85rem;
		right: 0.85rem;
		bottom: 0.2rem;
		height: 2px;
		border-radius: 2px;
		background: var(--wp--preset--color--gold);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 220ms ease;
	}

	header .wp-block-navigation a:not([href^="/speisekarte"]):hover::after,
	header .wp-block-navigation .current-menu-item > a:not([href^="/speisekarte"])::after {
		transform: scaleX(1);
	}

	/* "Speisekarte" as an outlined pill; "Jetzt bestellen" is the gold one. */
	header .wp-block-navigation a[href^="/speisekarte"] {
		margin-left: 0.5rem;
		padding: 0.55rem 1.25rem;
		border: 1.5px solid rgba(235, 194, 63, 0.6);
		border-radius: 999px;
		background: transparent;
		color: var(--wp--preset--color--cream);
		font-weight: 700;
		transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
	}

	header .wp-block-navigation a[href^="/speisekarte"]:hover {
		background: rgba(235, 194, 63, 0.14);
		border-color: var(--wp--preset--color--gold);
		color: var(--wp--preset--color--gold);
		transform: translateY(-1px);
	}

	header .wp-block-navigation a[href^="/speisekarte"]:active {
		transform: scale(0.97);
	}
}

/* Header "Jetzt bestellen" – the primary call to action (desktop; phones
 * use the highlighted item in the action bar). Plain link to the online
 * ordering page, opens in a new tab. */
.royal-orderbtn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.55rem 1.3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--maroon) !important;
	font-size: 0.98rem;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 8px 22px -8px rgba(235, 194, 63, 0.7);
	transition: transform 140ms ease, background-color 150ms ease;
}

.royal-orderbtn:hover {
	background: var(--wp--preset--color--cream);
	transform: translateY(-1px);
}

.royal-orderbtn:active {
	transform: scale(0.97);
}

.royal-orderbtn svg {
	width: 18px;
	height: 18px;
}

@media (max-width: 781px) {
	.royal-orderbtn {
		display: none;
	}

	.royal-header .wp-block-site-tagline {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Footer – compact: brand + social, both branches, links, bottom bar.
 * ------------------------------------------------------------------------- */

.royal-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-top: clamp(2.25rem, 4vw, 3rem);
	padding-bottom: 1rem;
	border-top: 3px solid var(--wp--preset--color--gold);
	font-size: 0.875rem;
}

.royal-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(45% 80% at 95% 0%, rgba(235, 194, 63, 0.12), transparent 70%);
}

.royal-footer a:where(:not(.wp-element-button)) {
	color: rgba(252, 246, 226, 0.85);
	text-decoration: none;
	transition: color 150ms ease;
}

.royal-footer a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--gold);
}

.royal-footer__grid {
	display: grid;
	grid-template-columns: 1.1fr 2fr 1fr;
	gap: 1.5rem clamp(1.5rem, 3vw, 3rem);
}

.royal-footer__logo {
	margin-bottom: 0.6rem;
}

.royal-footer__claim {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.2rem;
	line-height: 1.1;
}

.royal-footer__claim span {
	color: var(--wp--preset--color--gold);
}

.royal-footer__text {
	max-width: 19rem;
	margin: 0 0 0.9rem;
	color: rgba(252, 246, 226, 0.72);
}

.royal-footer__heading {
	margin: 0 0 0.55rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

.royal-footbranches {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

.royal-footbranch .royal-live {
	margin-bottom: 0.4rem;
	font-size: 0.75rem;
	font-weight: 600;
}

.royal-footbranch__addr,
.royal-footbranch__phone {
	margin: 0 0 0.15rem;
	line-height: 1.45;
}

.royal-footbranch__phone a {
	font-weight: 700;
	color: var(--wp--preset--color--cream);
}

.royal-footbranch__hours {
	margin: 0.35rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: rgba(252, 246, 226, 0.7);
}

.royal-footbranch__hours span:first-child {
	display: inline-block;
	min-width: 3rem;
	font-weight: 600;
	color: var(--wp--preset--color--cream);
}

.royal-footer__links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.royal-footer__links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.royal-footer__links li + li {
	margin-top: 0.3rem;
}

/* Social icons (footer + mobile menu) */
.royal-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.royal-social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(235, 194, 63, 0.4);
	border-radius: 50%;
	color: var(--wp--preset--color--cream);
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.royal-social a:hover,
.royal-social a:focus-visible {
	border-color: var(--wp--preset--color--gold);
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--maroon) !important;
	transform: translateY(-2px);
}

.royal-social svg {
	width: 19px;
	height: 19px;
}

.royal-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-top: 1.75rem;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(235, 194, 63, 0.18);
	font-size: 0.75rem;
	color: rgba(252, 246, 226, 0.6);
}

.royal-footer__bottom p {
	margin: 0;
}

.royal-footer .royal-footer__top {
	font-weight: 600;
}

@media (max-width: 959px) {
	.royal-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.royal-footer__brand {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem 1.5rem;
	}

	.royal-footer__brand .royal-footer__logo {
		margin: 0;
	}

	.royal-footer__text {
		display: none;
	}

	.royal-footbranches {
		grid-column: 1 / -1;
	}

	.royal-footer__links {
		grid-column: 1 / -1;
	}
}

@media (max-width: 479px) {
	.royal-footbranches {
		gap: 1rem;
	}

	.royal-footbranch__hours span:first-child {
		display: block;
		min-width: 0;
	}

	.royal-footer__bottom {
		justify-content: center;
		text-align: center;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile menu: hamburger button + full-screen overlay that opens with a
 * circular reveal from the button, staggered links and quick actions.
 * ------------------------------------------------------------------------- */

.royal-header .wp-block-navigation__responsive-container-open {
	position: relative;
	width: 44px;
	height: 44px;
	border: 1.5px solid rgba(235, 194, 63, 0.55);
	border-radius: 50%;
	color: var(--wp--preset--color--cream);
	transition: background-color 150ms ease, border-color 150ms ease;
}

.royal-header .wp-block-navigation__responsive-container-open svg {
	display: none;
}

/* Three bars, the middle one shorter. */
.royal-header .wp-block-navigation__responsive-container-open::before,
.royal-header .wp-block-navigation__responsive-container-open::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

.royal-header .wp-block-navigation__responsive-container-open::before {
	top: 15px;
	box-shadow: 0 6px 0 currentColor;
}

.royal-header .wp-block-navigation__responsive-container-open::after {
	top: 27px;
	right: 18px;
	background: var(--wp--preset--color--gold);
	transition: right 200ms ease;
}

.royal-header .wp-block-navigation__responsive-container-open:hover::after {
	right: 12px;
}

.royal-header .wp-block-navigation__responsive-container-open:hover {
	border-color: var(--wp--preset--color--gold);
	background: rgba(235, 194, 63, 0.12);
}

/* While the overlay is open: drop the header blur (it would trap the
 * fixed overlay inside the header box) and hide the action bar. */
html.has-modal-open .royal-header {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

html.has-modal-open .royal-action-bar {
	display: none;
}

.royal-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	color: var(--wp--preset--color--cream);
	background:
		radial-gradient(70% 45% at 100% 0%, rgba(192, 30, 36, 0.55), transparent 70%),
		radial-gradient(60% 40% at 0% 100%, rgba(235, 194, 63, 0.18), transparent 70%),
		linear-gradient(160deg, #601c27 0%, #2e0e14 100%) !important;
	overflow-y: auto;
}

/* Faint diamond pattern behind the menu. */
.royal-header .wp-block-navigation__responsive-container.is-menu-open::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image:
		repeating-linear-gradient(45deg, rgba(235, 194, 63, 0.045) 0 1px, transparent 1px 34px),
		repeating-linear-gradient(-45deg, rgba(235, 194, 63, 0.045) 0 1px, transparent 1px 34px);
}

.royal-header .is-menu-open .wp-block-navigation__responsive-close {
	max-width: none;
	min-height: 100%;
}

.royal-header .is-menu-open .wp-block-navigation__responsive-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: calc(1.25rem + var(--wp-admin--admin-bar--height, 0px)) 1.5rem 2rem;
}

/* Brand line top-left, level with the close button. */
.royal-header .is-menu-open .wp-block-navigation__responsive-dialog::before {
	content: "Döner Royal";
	position: absolute;
	top: calc(1.95rem + var(--wp-admin--admin-bar--height, 0px));
	left: 1.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.35rem;
	line-height: 1;
	color: var(--wp--preset--color--gold);
}

.royal-header .is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: calc(1.1rem + var(--wp-admin--admin-bar--height, 0px));
	right: 1.1rem;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--maroon);
	z-index: 2;
}

.royal-header .is-menu-open .wp-block-navigation__responsive-container-close svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.royal-header .is-menu-open .wp-block-navigation__responsive-container-content {
	flex: 1;
	align-items: stretch !important;
	justify-content: flex-start;
	gap: 0 !important;
	padding-top: 4.5rem !important;
}

.royal-header .is-menu-open .wp-block-navigation__container {
	align-items: stretch !important;
	gap: 0 !important;
	width: 100%;
	counter-reset: royal-nav;
}

.royal-header .is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid rgba(252, 246, 226, 0.12);
	counter-increment: royal-nav;
}

.royal-header .is-menu-open .wp-block-navigation-item__content {
	display: flex !important;
	align-items: baseline;
	gap: 1rem;
	width: 100%;
	padding: 1.35rem 0.25rem !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 9vw, 2.6rem) !important;
	font-weight: 400;
	line-height: 1.1;
	color: var(--wp--preset--color--cream);
}

.royal-header .is-menu-open .wp-block-navigation-item__content::before {
	content: counter(royal-nav, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--gold);
}

.royal-header .is-menu-open .wp-block-navigation-item__content::after {
	content: "→";
	margin-left: auto;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.5rem;
	color: var(--wp--preset--color--gold);
	opacity: 0.6;
	transition: transform 200ms ease, opacity 200ms ease;
}

.royal-header .is-menu-open .wp-block-navigation-item__content:hover::after,
.royal-header .is-menu-open .current-menu-item .wp-block-navigation-item__content::after {
	opacity: 1;
	transform: translateX(4px);
}

.royal-header .is-menu-open .current-menu-item .wp-block-navigation-item__content {
	color: var(--wp--preset--color--gold);
}

/* Quick actions inside the menu (moved in by site.js). */
.royal-menu-extras {
	display: none;
}

.is-menu-open .royal-menu-extras {
	display: block;
	width: 100%;
	margin-top: auto;
	padding-top: 2rem;
}

.royal-menu-extras__label {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

.royal-menu-extras__calls {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
	margin-bottom: 1.25rem;
}

.royal-menu-extras__call {
	display: grid;
	gap: 0.2rem;
	padding: 0.85rem 0.9rem;
	border: 1px solid rgba(235, 194, 63, 0.3);
	border-radius: 16px;
	background: rgba(252, 246, 226, 0.06);
	color: var(--wp--preset--color--cream) !important;
	font-size: 0.8125rem;
	text-decoration: none;
}

.royal-menu-extras__call:active {
	transform: scale(0.97);
}

.royal-menu-extras__call strong {
	font-size: 1rem;
}

.royal-menu-extras__phone {
	font-weight: 700;
	color: var(--wp--preset--color--gold);
}

.royal-social--menu {
	justify-content: center;
}

/* Short or narrow phones: smaller links so the whole menu fits. */
@media (max-height: 700px), (max-width: 359px) {
	.royal-header .is-menu-open .wp-block-navigation-item__content {
		padding: 0.9rem 0.25rem !important;
		font-size: clamp(1.6rem, 8vw, 2rem) !important;
	}

	.royal-header .is-menu-open .wp-block-navigation__responsive-container-content {
		padding-top: 3.75rem !important;
	}

	.royal-menu-extras {
		padding-top: 1.25rem;
	}

	.royal-menu-extras__call {
		padding: 0.65rem 0.75rem;
		font-size: 0.75rem;
	}
}

@media (prefers-reduced-motion: no-preference) {
	/* Circular reveal growing out of the hamburger (top right). */
	.royal-header .wp-block-navigation__responsive-container.is-menu-open {
		animation: royal-menu-reveal 650ms cubic-bezier(0.7, 0, 0.2, 1) both;
	}

	.royal-header .is-menu-open .wp-block-navigation-item,
	.royal-header .is-menu-open .royal-menu-extras {
		animation: royal-menu-item 550ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
		animation-delay: calc(260ms + var(--royal-i, 0) * 70ms);
	}

	.royal-header .is-menu-open .wp-block-navigation__responsive-container-close {
		animation: royal-menu-close 500ms cubic-bezier(0.2, 0.8, 0.3, 1) 300ms both;
	}
}

@keyframes royal-menu-reveal {
	from {
		clip-path: circle(0 at calc(100% - 2.6rem) 4.6rem);
	}

	to {
		clip-path: circle(150vmax at calc(100% - 2.6rem) 4.6rem);
	}
}

@keyframes royal-menu-item {
	from {
		opacity: 0;
		transform: translateY(26px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes royal-menu-close {
	from {
		opacity: 0;
		transform: rotate(-90deg) scale(0.5);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile action bar: Anrufen · Route · Speisekarte
 * Works without JavaScript – the popovers are <details> elements.
 * ------------------------------------------------------------------------- */

.royal-action-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 100;
	display: flex;
	align-items: stretch;
	min-height: var(--wp--custom--action-bar-height, 4rem);
	padding-bottom: env(safe-area-inset-bottom);
	background-color: var(--wp--preset--color--maroon);
	border-top: 2px solid var(--wp--preset--color--gold);
	box-shadow: 0 -4px 16px rgba(34, 34, 33, 0.35);
}

.royal-action-bar__item {
	position: static; /* sheets anchor to the whole bar, not the narrow item */
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
}

.royal-action-bar__item + .royal-action-bar__item {
	border-inline-start: 1px solid rgba(252, 246, 226, 0.15);
}

.royal-action-bar__button {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 44px;
	padding: 0.5rem 0.25rem;
	color: var(--wp--preset--color--cream);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
	text-align: center;
}

.royal-action-bar__button::-webkit-details-marker {
	display: none;
}

.royal-action-bar__button svg {
	width: 22px;
	height: 22px;
	color: var(--wp--preset--color--gold);
}

/* "Bestellen": highlighted primary item. */
.royal-action-bar__order.royal-action-bar__button {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--maroon);
	font-weight: 800;
}

.royal-action-bar__order.royal-action-bar__button svg {
	color: var(--wp--preset--color--maroon);
}

.royal-action-bar__order.royal-action-bar__button:hover {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--maroon);
}

a.royal-action-bar__button:hover,
.royal-action-bar__item[open] > .royal-action-bar__button,
.royal-action-bar__button:hover {
	color: var(--wp--preset--color--gold);
}

/* Invisible full-screen layer so tapping outside closes the sheet. */
.royal-action-bar__item[open] > .royal-action-bar__button::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background: rgba(34, 34, 33, 0.4);
}

.royal-action-bar__sheet {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	inset-inline: 0.5rem;
	max-width: 26rem;
	margin-inline: auto;
	padding: 0.5rem;
	background: var(--wp--preset--color--base);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(34, 34, 33, 0.35);
}


.royal-action-bar__sheet a {
	display: block;
	padding: 0.75rem;
	min-height: 44px;
	border-radius: 8px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.royal-action-bar__sheet a:hover,
.royal-action-bar__sheet a:focus-visible {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--maroon);
}

.royal-action-bar__sheet strong {
	display: block;
	color: var(--wp--preset--color--maroon);
	font-weight: 700;
}

.royal-action-bar__sheet span {
	font-size: 0.875rem;
	color: rgba(34, 34, 33, 0.75);
}

@keyframes royal-sheet-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.royal-action-bar__item[open] .royal-action-bar__sheet {
	animation: royal-sheet-in 160ms ease-out;
}

/* ---------------------------------------------------------------------------
 * Branded intro (first visit per session). Hidden by default – only the
 * inline script reveals it, so content is never blocked if JS fails.
 * ------------------------------------------------------------------------- */

.royal-intro {
	display: none;
}

html.royal-intro-active .royal-intro {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, #601c27 0%, #2e0e14 100%);
	opacity: 1;
	transition: opacity 280ms ease;
}

html.royal-intro-active .royal-intro.is-done {
	opacity: 0;
	pointer-events: none;
}

.royal-intro__inner {
	text-align: center;
}

.royal-intro__logo {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	animation: royal-intro-rise 650ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

.royal-intro__claim {
	margin: 0.9rem 0 0;
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--heading, serif);
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	animation: royal-intro-fade 500ms ease 350ms both;
}

.royal-intro__shine {
	display: block;
	width: 130px;
	height: 2px;
	margin: 0.8rem auto 0;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--wp--preset--color--gold), transparent);
	background-size: 200% 100%;
	animation: royal-intro-shine 700ms ease 250ms both;
}

@keyframes royal-intro-rise {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.85);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes royal-intro-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes royal-intro-shine {
	from {
		background-position: 180% 0;
		opacity: 0;
	}

	to {
		background-position: 0% 0;
		opacity: 1;
	}
}

/* ---------------------------------------------------------------------------
 * Scroll reveal – active only when JS adds html.royal-motion (never with
 * prefers-reduced-motion). Opacity/transform only: zero layout shift,
 * and without JS everything is simply visible.
 * ------------------------------------------------------------------------- */

html.royal-motion .royal-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 550ms ease, transform 550ms ease;
}

html.royal-motion .royal-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------------------
 * Micro-interactions & live-status pulse
 * ------------------------------------------------------------------------- */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.wp-element-button,
	.royal-btn--ghost {
		transition: transform 140ms ease, box-shadow 140ms ease, background-color 160ms ease, color 160ms ease;
	}

	.wp-element-button:hover,
	.royal-btn--ghost:hover {
		transform: translateY(-1px);
		box-shadow: 0 6px 16px rgba(96, 28, 39, 0.25);
	}

	.royal-item:hover {
		transform: translateY(-1px);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.royal-status-dot.is-open {
		animation: royal-pulse 2.6s ease-in-out infinite;
	}
}

@keyframes royal-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 4px rgba(26, 127, 55, 0.15);
	}

	50% {
		box-shadow: 0 0 0 8px rgba(26, 127, 55, 0.05);
	}
}

/* ---------------------------------------------------------------------------
 * Branded placeholder for dishes without a photo: warm gradient,
 * category icon, small crown watermark.
 * ------------------------------------------------------------------------- */

.royal-featured__img--placeholder {
	position: relative;
	background:
		radial-gradient(90% 90% at 20% 15%, rgba(252, 246, 226, 0.35), transparent 55%),
		linear-gradient(135deg, var(--wp--preset--color--gold) 0%, var(--wp--preset--color--amber) 100%);
}

.royal-featured__img--placeholder::after {
	content: "👑";
	position: absolute;
	top: 0.35rem;
	right: 0.5rem;
	font-size: 0.8rem;
	opacity: 0.55;
}

/* ---------------------------------------------------------------------------
 * Cookie consent banner
 * ------------------------------------------------------------------------- */

.royal-consent[hidden] {
	display: none;
}

.royal-consent {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 120;
	padding: 0.75rem;
	padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
	display: flex;
	justify-content: center;
	pointer-events: none;
}

@media (max-width: 781px) {
	.royal-consent {
		bottom: calc(var(--wp--custom--action-bar-height, 4rem) + env(safe-area-inset-bottom));
	}
}

.royal-consent__card {
	pointer-events: auto;
	width: 100%;
	max-width: 34rem;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(96, 28, 39, 0.2);
	border-top: 4px solid var(--wp--preset--color--gold);
	border-radius: 16px;
	padding: 1rem 1.25rem;
	box-shadow: 0 12px 40px rgba(34, 34, 33, 0.3);
}

.royal-consent__title {
	font-size: 1.05rem;
	margin: 0 0 0.35rem;
	color: var(--wp--preset--color--maroon);
}

.royal-consent__text {
	margin: 0 0 0.6rem;
	font-size: 0.875rem;
	color: rgba(34, 34, 33, 0.8);
}

/* The banner sits inside the dark footer markup – force readable links. */
.royal-footer .royal-consent__card a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--primary);
	text-decoration-color: var(--wp--preset--color--primary);
}

.royal-consent__opts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin-bottom: 0.75rem;
}

.royal-consent__opt {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.875rem;
	font-weight: 600;
	min-height: 40px;
}

.royal-consent__opt input {
	width: 18px;
	height: 18px;
	accent-color: var(--wp--preset--color--primary);
}

.royal-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.royal-consent__btn {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--maroon);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--maroon);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 120ms ease, background-color 160ms ease, color 160ms ease;
}

.royal-consent__btn:active {
	transform: scale(0.97);
}

.royal-consent__btn--primary {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.royal-consent__btn--primary:hover {
	background: var(--wp--preset--color--maroon);
	border-color: var(--wp--preset--color--maroon);
}

/* Reserve space above the bar on mobile; hide the bar on desktop. */
@media (max-width: 781px) {
	body {
		padding-bottom: calc(var(--wp--custom--action-bar-height, 4rem) + env(safe-area-inset-bottom));
	}
}

@media (min-width: 782px) {
	.royal-action-bar {
		display: none;
	}

	body {
		padding-bottom: 0;
	}
}
