/**
 * Servery front end.
 *
 * Written to sit inside somebody else's theme without fighting it: no resets
 * beyond what each component needs, no global element selectors, everything
 * namespaced. Type inherits the theme's font so the menu reads as part of
 * the site rather than a widget bolted onto it.
 *
 * The accent colour comes from the plugin settings as `--servery-accent`
 * (and `--servery-on-accent` for text on it), printed inline in the head.
 * A theme can override any `--sv-*` token on `.servery-scope` or `:root`.
 *
 * @package Servery
 */

/* -------------------------------------------------------------------------
 * Tokens
 * ---------------------------------------------------------------------- */

:root {
	--sv-accent: var( --servery-accent, #e5484d );
	--sv-on-accent: var( --servery-on-accent, #fff );
	--sv-accent-soft: color-mix( in srgb, var( --sv-accent ) 10%, #fff );
	--sv-accent-line: color-mix( in srgb, var( --sv-accent ) 45%, #fff );

	--sv-ink: #1c1917;
	--sv-ink-2: #44403c;
	--sv-muted: #6b6560;
	--sv-line: #e7e5e4;
	--sv-line-strong: #d6d3d1;
	--sv-surface: #fff;
	--sv-surface-2: #f8f7f6;
	--sv-page: var( --wp--preset--color--base, #fff );

	--sv-success: #15803d;
	--sv-success-soft: #f0fdf4;
	--sv-warning: #92400e;
	--sv-warning-soft: #fffbeb;
	--sv-warning-line: #fde68a;
	--sv-danger: #b91c1c;
	--sv-danger-soft: #fef2f2;
	--sv-danger-line: #fecaca;

	--sv-radius: 16px;
	--sv-radius-sm: 10px;
	--sv-shadow: 0 1px 2px rgba( 28, 25, 23, 0.05 ), 0 8px 24px -12px rgba( 28, 25, 23, 0.07 );
	--sv-shadow-lg: 0 24px 48px -12px rgba( 28, 25, 23, 0.07 );
	--sv-sticky-top: 0px;
	--sv-ease: cubic-bezier( 0.2, 0.8, 0.2, 1 );
}

.admin-bar {
	--sv-sticky-top: 32px;
}

@media ( max-width: 782px ) {
	.admin-bar {
		--sv-sticky-top: 46px;
	}
}

@media ( max-width: 600px ) {
	/* The admin bar scrolls away on small screens. */
	.admin-bar {
		--sv-sticky-top: 0px;
	}
}

html.servery-locked,
html.servery-locked body {
	overflow: hidden;
}

.servery-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.servery-menu [hidden],
.servery-checkout [hidden],
.servery-cart [hidden],
.servery-cart-toggle [hidden],
.servery-sheet [hidden],
.servery-single [hidden] {
	display: none !important;
}

.servery-menu,
.servery-checkout,
.servery-single,
.servery-track,
.servery-track-form,
.servery-cart,
.servery-sheet {
	color: var( --sv-ink );
	-webkit-font-smoothing: antialiased;
}

.servery-menu *,
.servery-checkout *,
.servery-single *,
.servery-track *,
.servery-cart *,
.servery-sheet *,
.servery-cart-toggle * {
	box-sizing: border-box;
}

.servery-muted {
	color: var( --sv-muted );
}

.servery-text-error {
	color: var( --sv-danger ) !important;
}

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */

.servery-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var( --sv-line-strong );
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface );
	color: var( --sv-ink );
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.1s ease-out;
	-webkit-tap-highlight-color: transparent;
}

.servery-button:hover {
	background: var( --sv-surface-2 );
	color: var( --sv-ink );
	text-decoration: none;
}

.servery-button:active {
	transform: translateY( 1px );
}

.servery-button--primary,
.servery-button--primary:hover,
.servery-button--primary:visited {
	background: var( --sv-accent );
	border-color: var( --sv-accent );
	color: var( --sv-on-accent );
}

.servery-button--primary:hover {
	filter: brightness( 0.94 );
}

.servery-button--ghost {
	background: transparent;
}

.servery-button--block {
	display: flex;
	width: 100%;
	justify-content: space-between;
	padding: 0 20px;
}

.servery-button--block > :only-child {
	margin: 0 auto;
}

.servery-button--lg {
	min-height: 52px;
	font-size: 1rem;
	border-radius: 12px;
}

.servery-button[disabled],
.servery-button[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	filter: none;
	transform: none;
}

.servery-button.is-busy,
.servery-add.is-busy {
	cursor: progress;
	opacity: 0.85;
}

.servery-button.is-busy::after,
.servery-add.is-busy::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: servery-spin 0.7s linear infinite;
	flex: 0 0 auto;
}

.servery-button:focus-visible,
.servery-add:focus-visible,
.servery-icon-button:focus-visible,
.servery-menu__navlink:focus-visible,
.servery-cart-toggle:focus-visible,
.servery-qty button:focus-visible,
.servery-sheet__close:focus-visible,
.servery-item__link:focus-visible {
	outline: 3px solid var( --sv-accent-line );
	outline-offset: 2px;
}

.servery-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --sv-surface-2 );
	color: var( --sv-ink );
	cursor: pointer;
}

.servery-icon-button:hover {
	background: var( --sv-line );
}

@keyframes servery-spin {
	to {
		transform: rotate( 360deg );
	}
}

/* -------------------------------------------------------------------------
 * Notices, empty and loading states
 * ---------------------------------------------------------------------- */

.servery-notice {
	margin: 12px 0;
	padding: 12px 14px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface-2 );
	font-size: 0.9rem;
	line-height: 1.5;
}

.servery-notice p {
	margin: 0 0 10px;
}

.servery-notice--warning {
	background: var( --sv-warning-soft );
	border-color: var( --sv-warning-line );
	color: var( --sv-warning );
}

.servery-notice--error {
	background: var( --sv-danger-soft );
	border-color: var( --sv-danger-line );
	color: var( --sv-danger );
}

.servery-notice a {
	color: inherit;
	font-weight: 600;
}

.servery-empty {
	padding: 48px 24px;
	border: 1px dashed var( --sv-line-strong );
	border-radius: var( --sv-radius );
	background: var( --sv-surface );
	text-align: center;
	color: var( --sv-muted );
}

.servery-empty p {
	margin: 0 0 8px;
}

.servery-empty__title {
	color: var( --sv-ink );
	font-size: 1.125rem;
	font-weight: 600;
}

.servery-empty .servery-button {
	margin-top: 12px;
}

.servery-loading {
	color: var( --sv-muted );
	font-size: 0.9375rem;
}

.servery-loading::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: servery-spin 0.7s linear infinite;
}

.servery-skeleton {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( min( 100%, 240px ), 1fr ) );
	gap: 16px;
}

.servery-skeleton__card {
	display: grid;
	gap: 10px;
	padding-bottom: 16px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius );
	overflow: hidden;
}

.servery-skeleton__card span {
	display: block;
	height: 14px;
	margin: 0 16px;
	border-radius: 6px;
	background: linear-gradient( 90deg, var( --sv-surface-2 ) 25%, var( --sv-line ) 50%, var( --sv-surface-2 ) 75% );
	background-size: 200% 100%;
	animation: servery-shimmer 1.4s ease-in-out infinite;
}

.servery-skeleton__card span:first-child {
	height: auto;
	aspect-ratio: 4 / 3;
	margin: 0 0 6px;
	border-radius: 0;
}

.servery-skeleton__card span:last-child {
	width: 40%;
}

@keyframes servery-shimmer {
	from {
		background-position: 200% 0;
	}

	to {
		background-position: -200% 0;
	}
}

/* -------------------------------------------------------------------------
 * Category navigation
 * ---------------------------------------------------------------------- */

.servery-menu {
	position: relative;
}

.servery-menu__nav {
	position: sticky;
	top: var( --sv-sticky-top );
	z-index: 30;
	margin: 0 0 24px;
	padding: 10px 0;
	background: var( --sv-page );
	border-bottom: 1px solid var( --sv-line );
}

.servery-menu__navtrack {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	scroll-padding: 0 16px;
}

.servery-menu__navtrack::-webkit-scrollbar {
	display: none;
}

.servery-menu__navlink {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var( --sv-line );
	border-radius: 999px;
	background: var( --sv-surface );
	color: var( --sv-ink-2 );
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	}

.servery-menu__navlink:hover {
	border-color: var( --sv-line-strong );
	color: var( --sv-ink );
	text-decoration: none;
}

.servery-menu__navlink.is-active {
	background: var( --sv-ink );
	border-color: var( --sv-ink );
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Sections and dish cards
 * ---------------------------------------------------------------------- */

.servery-section {
	margin: 0 0 40px;
	scroll-margin-top: calc( var( --sv-sticky-top ) + 76px );
}

.servery-section__head {
	margin: 0 0 16px;
}

.servery-section__title {
	margin: 0;
	font-size: clamp( 1.3rem, 1.1rem + 0.8vw, 1.6rem );
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var( --sv-ink );
}

.servery-section__description {
	margin: 6px 0 0;
	color: var( --sv-muted );
	font-size: 0.9375rem;
	line-height: 1.5;
}

.servery-items {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( min( 100%, 240px ), 1fr ) );
	gap: 16px;
}

@media ( min-width: 960px ) {
	.servery-menu[style*="--servery-columns"] .servery-items {
		grid-template-columns: repeat( var( --servery-columns ), minmax( 0, 1fr ) );
	}
}

.servery-item {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius );
	background: var( --sv-surface );
	overflow: hidden;
}

@media ( hover: hover ) {
	.servery-item:hover {
		border-color: var( --sv-line-strong );
		box-shadow: var( --sv-shadow );
	}

	.servery-item:hover .servery-item__media img {
		transform: scale( 1.03 );
	}
}

.servery-item__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var( --sv-surface-2 );
	overflow: hidden;
}

.servery-item__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.3s ease-out;
}

.servery-item__media--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var( --sv-accent-soft );
	color: var( --sv-accent );
}

.servery-item__media--placeholder svg {
	width: 40px;
	height: 40px;
	opacity: 0.55;
}

.servery-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var( --sv-accent );
	color: var( --sv-on-accent );
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.servery-item__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
}

.servery-item__name {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	color: var( --sv-ink );
}

.servery-item__link {
	color: inherit;
	text-decoration: none;
}

/* The whole card opens the dish page; the add button sits above it. */
.servery-item__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.servery-item__link:hover {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.servery-item__description {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var( --sv-muted );
	font-size: 0.875rem;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.servery-item__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.servery-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: var( --sv-success-soft );
	color: var( --sv-success );
	font-size: 0.75rem;
	font-weight: 600;
}

.servery-item__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}

.servery-item__price {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	font-variant-numeric: tabular-nums;
}

.servery-item__now {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-item__was {
	color: var( --sv-muted );
	font-size: 0.875rem;
	text-decoration: line-through;
}

.servery-add {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	padding: 0 16px 0 12px;
	border: 0;
	border-radius: 999px;
	background: var( --sv-accent );
	color: var( --sv-on-accent );
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.1s ease-out;
	-webkit-tap-highlight-color: transparent;
}

.servery-add:hover {
	filter: brightness( 0.94 );
}

.servery-add:active {
	transform: scale( 0.96 );
}

.servery-add.is-busy svg,
.servery-add.is-busy .servery-add__label {
	display: none;
}

.servery-add.is-added {
	background: var( --sv-success );
	color: #fff;
}

.servery-item__soldout {
	position: relative;
	z-index: 2;
	padding: 6px 12px;
	border-radius: 999px;
	background: var( --sv-surface-2 );
	color: var( --sv-muted );
	font-size: 0.8125rem;
	font-weight: 600;
}

.servery-item--unavailable .servery-item__media img {
	filter: grayscale( 1 );
	opacity: 0.55;
}

.servery-item--unavailable .servery-item__now {
	color: var( --sv-muted );
}

/*
 * Phones: a list, text on the left and the photo on the right, the way
 * delivery apps have taught everyone to scan a menu with one thumb.
 */
@media ( max-width: 640px ) {
	.servery-items {
		grid-template-columns: minmax( 0, 1fr );
		gap: 0;
		border-top: 1px solid var( --sv-line );
	}

	.servery-item {
		flex-direction: row-reverse;
		align-items: stretch;
		gap: 14px;
		padding: 16px 0;
		border: 0;
		border-bottom: 1px solid var( --sv-line );
		border-radius: 0;
		background: transparent;
	}

	.servery-item:hover {
		box-shadow: none;
	}

	.servery-item__media--placeholder {
		display: none;
	}

	.servery-item__media {
		flex: 0 0 104px;
		width: 104px;
		height: 104px;
		aspect-ratio: auto;
		border-radius: 12px;
		align-self: flex-start;
	}

	.servery-badge {
		top: 6px;
		left: 6px;
		padding: 2px 8px;
		font-size: 0.75rem;
	}

	.servery-item__body {
		padding: 0;
		gap: 4px;
	}

	.servery-item__name {
		font-size: 1rem;
	}

	/* Price sits under the name, not pinned to the bottom of the photo. */
	.servery-item__footer {
		margin-top: 0;
		padding-top: 4px;
	}

	.servery-item:not( .servery-item--no-media ) .servery-add {
		position: absolute;
		right: 6px;
		top: 66px;
		height: 44px;
		min-width: 44px;
		padding: 0;
		box-shadow: 0 0 0 2px var( --sv-surface );
	}

	.servery-item:not( .servery-item--no-media ) .servery-add__label {
		display: none;
	}
}

.servery-items--list {
	grid-template-columns: minmax( 0, 1fr );
}

/* -------------------------------------------------------------------------
 * Floating basket button
 * ---------------------------------------------------------------------- */

.servery-cart-toggle {
	position: fixed;
	right: max( 24px, env( safe-area-inset-right ) );
	bottom: max( 24px, env( safe-area-inset-bottom ) );
	z-index: 99990;
	display: none;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 0 22px 0 14px;
	border: 0;
	border-radius: 999px;
	background: var( --sv-ink );
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	box-shadow: var( --sv-shadow-lg );
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.servery-has-items .servery-cart-toggle {
	display: inline-flex;
	animation: servery-rise 0.3s ease-out;
}

.servery-cart-open .servery-cart-toggle {
	visibility: hidden;
}

.servery-cart-toggle__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.12 );
}

.servery-cart-toggle__count {
	position: absolute;
	top: -4px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var( --sv-accent );
	color: var( --sv-on-accent );
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.servery-cart-toggle__total {
	font-variant-numeric: tabular-nums;
	opacity: 0.9;
}

.servery-cart-toggle.is-bumped {
	animation: servery-bump 0.3s ease-out;
}

@media ( max-width: 640px ) {
	.servery-cart-toggle {
		left: max( 12px, env( safe-area-inset-left ) );
		right: max( 12px, env( safe-area-inset-right ) );
		bottom: max( 12px, env( safe-area-inset-bottom ) );
		justify-content: space-between;
		border-radius: 14px;
	}

	.servery-cart-toggle__label {
		margin-right: auto;
	}

	/* Keep the last dish clear of the bar. */
	.servery-has-items .servery-menu {
		padding-bottom: 80px;
	}
}

@keyframes servery-rise {
	from {
		transform: translateY( 16px );
		opacity: 0;
	}
}

@keyframes servery-bump {
	40% {
		transform: scale( 1.05 );
	}
}

/* -------------------------------------------------------------------------
 * Basket drawer
 * ---------------------------------------------------------------------- */

.servery-cart-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99995;
	background: rgba( 12, 10, 9, 0.45 );
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease-out;
}

.servery-cart-open .servery-cart-backdrop {
	opacity: 1;
	pointer-events: auto;
}

.servery-cart--drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99996;
	display: flex;
	flex-direction: column;
	width: min( 420px, 100% );
	border-left: 1px solid var( --sv-line );
	background: var( --sv-surface );
	box-shadow: var( --sv-shadow-lg );
	transform: translateX( 100% );
	visibility: hidden;
	transition: transform 0.2s ease-in, visibility 0s linear 0.2s;
}

.servery-cart-open .servery-cart--drawer {
	transform: none;
	visibility: visible;
	transition: transform 0.3s ease-out, visibility 0s;
}

.servery-cart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	padding-top: max( 18px, env( safe-area-inset-top ) );
	border-bottom: 1px solid var( --sv-line );
}

.servery-cart__head h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	color: var( --sv-ink );
}

.servery-cart__count {
	margin: 2px 0 0;
	color: var( --sv-muted );
	font-size: 0.875rem;
}

.servery-cart__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 20px 16px;
	overscroll-behavior: contain;
}

.servery-cart__foot {
	padding: 16px 20px;
	padding-bottom: max( 16px, env( safe-area-inset-bottom ) );
	border-top: 1px solid var( --sv-line );
	background: var( --sv-surface );
}

.servery-cart__foot:empty {
	display: none;
}

.servery-cart__foot .servery-notice {
	margin: 0;
}

.servery-cart__empty {
	padding: 40px 12px;
	text-align: center;
	color: var( --sv-muted );
}

.servery-cart__empty p {
	margin: 0 0 4px;
}

.servery-cart__empty strong {
	color: var( --sv-ink );
}

.servery-cart__empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var( --sv-surface-2 );
	color: var( --sv-muted );
}

.servery-cart__lines {
	margin: 0;
	padding: 0;
	list-style: none;
}

.servery-cart__line {
	display: grid;
	grid-template-columns: auto minmax( 0, 1fr ) auto;
	align-items: start;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var( --sv-line );
}

.servery-cart__line > .servery-cart__info:first-child {
	grid-column: 1 / 3;
}

.servery-cart__line.is-unavailable {
	opacity: 0.7;
}

.servery-cart__thumb {
	display: block;
	width: 52px;
	height: 52px;
	max-width: none;
	border-radius: 10px;
	object-fit: cover;
	background: var( --sv-surface-2 );
}

.servery-cart__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.servery-cart__name {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: var( --sv-ink );
}

.servery-cart__mods,
.servery-cart__notes {
	color: var( --sv-muted );
	font-size: 0.8125rem;
	line-height: 1.45;
}

.servery-cart__notes {
	font-style: italic;
}

.servery-cart__info .servery-qty {
	margin-top: 8px;
	align-self: flex-start;
}

.servery-cart__price {
	font-size: 0.9375rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.servery-cart__totals {
	padding: 12px 0 4px;
}

.servery-cart__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	color: var( --sv-ink-2 );
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

.servery-cart__row--discount {
	color: var( --sv-success );
}

.servery-cart__row--total {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid var( --sv-line );
	color: var( --sv-ink );
	font-size: 1.0625rem;
	font-weight: 600;
}

/* Legacy class kept for themes that override the template. */
.servery-cart__warning {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: var( --sv-radius-sm );
	background: var( --sv-warning-soft );
	color: var( --sv-warning );
	font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
 * Quantity stepper
 * ---------------------------------------------------------------------- */

.servery-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var( --sv-line-strong );
	border-radius: 999px;
	background: var( --sv-surface );
}

.servery-qty button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var( --sv-ink );
	cursor: pointer;
}

.servery-qty button:hover {
	background: var( --sv-surface-2 );
}

.servery-qty button[disabled] {
	opacity: 0.4;
	cursor: progress;
}

.servery-qty output {
	min-width: 24px;
	font-weight: 600;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.servery-qty--sm button {
	width: 44px;
	height: 40px;
}

.servery-qty--sm output {
	min-width: 20px;
	font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
 * Options sheet
 * ---------------------------------------------------------------------- */

.servery-sheet {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.servery-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 12, 10, 9, 0.5 );
	opacity: 0;
	transition: opacity 0.2s ease;
}

.servery-sheet.is-open .servery-sheet__backdrop {
	opacity: 1;
}

.servery-sheet__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min( 540px, 100% );
	max-height: min( 88vh, 860px );
	border: 1px solid var( --sv-line );
	border-radius: 20px;
	background: var( --sv-surface );
	box-shadow: var( --sv-shadow-lg );
	overflow: hidden;
	opacity: 0;
	transform: translateY( 12px ) scale( 0.98 );
	transition: opacity 0.2s ease-out, transform 0.3s ease-out;
}

.servery-sheet.is-open .servery-sheet__panel {
	opacity: 1;
	transform: none;
}

.servery-sheet__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	border: 1px solid var( --sv-line );
	background: var( --sv-surface );
	color: var( --sv-ink );
	cursor: pointer;
}

.servery-sheet__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: 8px;
}

.servery-sheet__media {
	aspect-ratio: 2 / 1;
	background: var( --sv-surface-2 );
}

.servery-sheet__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.servery-sheet__head {
	padding: 20px 20px 8px;
}

.servery-sheet__panel--no-media .servery-sheet__head {
	padding-top: 24px;
	padding-right: 64px;
}

.servery-sheet__head h2 {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.25;
	color: var( --sv-ink );
}

.servery-sheet__price {
	margin: 4px 0 0;
	font-size: 1rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var( --sv-ink-2 );
}

.servery-sheet__description {
	margin: 10px 0 0;
	color: var( --sv-muted );
	font-size: 0.9375rem;
	line-height: 1.55;
}

.servery-group {
	min-width: 0;
	margin: 0;
	padding: 16px 20px 4px;
	border: 0;
	border-top: 8px solid var( --sv-surface-2 );
}

.servery-group__title {
	display: flex;
	float: left;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0 0 6px;
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-group__title + * {
	clear: both;
}

.servery-group__rule {
	flex: 0 0 auto;
	padding: 3px 10px;
	border-radius: 999px;
	background: var( --sv-surface-2 );
	color: var( --sv-muted );
	font-size: 0.75rem;
	font-weight: 600;
}

.servery-group__rule.is-required {
	background: var( --sv-accent-soft );
	color: var( --sv-ink );
}

.servery-group__description {
	margin: 0 0 4px;
	color: var( --sv-muted );
	font-size: 0.875rem;
}

.servery-group__error {
	margin: 0 0 6px;
	color: var( --sv-danger );
	font-size: 0.875rem;
	font-weight: 600;
}

.servery-group--error .servery-group__rule {
	background: var( --sv-danger-soft );
	color: var( --sv-danger );
}

.servery-group__options {
	clear: both;
}

.servery-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 10px 0;
	border-bottom: 1px solid var( --sv-line );
	cursor: pointer;
}

.servery-option:last-child {
	border-bottom: 0;
}

.servery-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.servery-option__mark {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border: 2px solid var( --sv-line-strong );
	background: var( --sv-surface );
	}

.servery-option__mark--radio {
	border-radius: 50%;
}

.servery-option__mark--checkbox {
	border-radius: 6px;
}

.servery-option input:checked + .servery-option__mark--radio {
	border-color: var( --sv-accent );
	box-shadow: inset 0 0 0 4px var( --sv-surface );
	background: var( --sv-accent );
}

.servery-option input:checked + .servery-option__mark--checkbox {
	border-color: var( --sv-accent );
	background: var( --sv-accent ) url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) center / 16px no-repeat;
}

.servery-option input:focus-visible + .servery-option__mark {
	box-shadow: 0 0 0 3px var( --sv-accent-line );
}

.servery-option input:checked:focus-visible + .servery-option__mark--radio {
	box-shadow: inset 0 0 0 4px var( --sv-surface ), 0 0 0 3px var( --sv-accent-line );
}

.servery-option__name {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var( --sv-ink );
}

.servery-option__name small {
	color: var( --sv-muted );
	font-size: 0.8125rem;
}

.servery-option__price {
	flex: 0 0 auto;
	color: var( --sv-muted );
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}

.servery-option--disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.servery-sheet__notes {
	display: block;
	margin: 0;
	padding: 16px 20px 12px;
	border-top: 8px solid var( --sv-surface-2 );
}

.servery-sheet__notes > span {
	display: block;
	margin-bottom: 8px;
	font-size: 1rem;
	font-weight: 600;
}

.servery-sheet__notes small {
	color: var( --sv-muted );
	font-size: 0.8125rem;
	font-weight: 500;
}

.servery-sheet__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	padding-bottom: max( 14px, env( safe-area-inset-bottom ) );
	border-top: 1px solid var( --sv-line );
	background: var( --sv-surface );
}

.servery-sheet__add {
	flex: 1 1 auto;
	justify-content: space-between;
	min-height: 48px;
	border-radius: 12px;
}

.servery-sheet__add > span:only-of-type {
	margin: 0 auto;
}

.servery-sheet__total {
	font-variant-numeric: tabular-nums;
}

.servery-sheet__total:empty {
	display: none;
}

@media ( max-width: 640px ) {
	.servery-sheet {
		align-items: flex-end;
		padding: 0;
	}

	.servery-sheet__panel {
		width: 100%;
		max-height: 92vh;
		border-radius: 20px 20px 0 0;
		transform: translateY( 40px );
	}
}

/* -------------------------------------------------------------------------
 * Form fields (checkout, bookings, tracking)
 * ---------------------------------------------------------------------- */

.servery-fields {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 14px;
	clear: both;
}

@container ( min-width: 460px ) {
	.servery-fields {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.servery-field--full {
		grid-column: 1 / -1;
	}
}

.servery-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.servery-field label,
.servery-label,
.servery-track-form label,
.servery-location-finder label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-field label small,
.servery-label small {
	color: var( --sv-muted );
	font-weight: 500;
}

.servery-field__hint {
	color: var( --sv-muted );
	font-size: 0.8125rem;
	line-height: 1.45;
}

.servery-checkout input[type="text"],
.servery-checkout input[type="email"],
.servery-checkout input[type="tel"],
.servery-checkout input[type="date"],
.servery-checkout select,
.servery-checkout textarea,
.servery-track-form input[type="text"],
.servery-sheet textarea {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var( --sv-line-strong );
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface );
	color: var( --sv-ink );
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	box-shadow: none;
}

.servery-checkout textarea,
.servery-sheet textarea {
	min-height: 72px;
	resize: vertical;
}

.servery-checkout input:focus,
.servery-checkout select:focus,
.servery-checkout textarea:focus,
.servery-track-form input:focus,
.servery-sheet textarea:focus {
	border-color: var( --sv-accent );
	outline: none;
	box-shadow: 0 0 0 3px var( --sv-accent-line );
}

.servery-checkout input:user-invalid,
.servery-checkout select:user-invalid {
	border-color: var( --sv-danger );
}

.servery-checkout input::placeholder,
.servery-checkout textarea::placeholder,
.servery-sheet textarea::placeholder {
	color: #a8a29e;
}

.servery-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin-top: 8px;
	font-size: 0.9375rem;
	cursor: pointer;
}

.servery-check input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var( --sv-accent );
}

/* Choice cards: service, timing and payment. */
.servery-choices {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 170px ), 1fr ) );
	gap: 10px;
	clear: both;
}

.servery-choices--stack {
	grid-template-columns: minmax( 0, 1fr );
}

.servery-choice {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-height: 56px;
	padding: 12px 16px 12px 46px;
	border: 1.5px solid var( --sv-line );
	border-radius: 12px;
	background: var( --sv-surface );
	cursor: pointer;
}

.servery-choice:hover {
	border-color: var( --sv-line-strong );
}

.servery-choice input {
	position: absolute;
	top: 50%;
	left: 16px;
	width: 18px;
	height: 18px;
	margin: -9px 0 0;
	accent-color: var( --sv-accent );
}

.servery-choice:has( input:checked ) {
	border-color: var( --sv-accent );
	background: var( --sv-accent-soft );
}

.servery-choice:has( input:focus-visible ) {
	box-shadow: 0 0 0 3px var( --sv-accent-line );
}

.servery-choice__title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-choice__meta {
	color: var( --sv-muted );
	font-size: 0.8125rem;
	line-height: 1.4;
}

.servery-schedule {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 180px ), 1fr ) );
	gap: 12px;
	margin-top: 14px;
}

/* -------------------------------------------------------------------------
 * Checkout
 * ---------------------------------------------------------------------- */

.servery-checkout__form {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 24px;
	align-items: start;
}

/*
 * Container queries, not media queries: the checkout sits in whatever
 * column the theme gives it, and a 650px content column on a wide screen
 * must not be split in two.
 */
.servery-checkout,
.servery-step {
	container-type: inline-size;
}

@container ( min-width: 800px ) {
	.servery-checkout__form {
		grid-template-columns: minmax( 0, 1fr ) minmax( 320px, 380px );
		gap: 32px;
	}

	.servery-checkout__summary {
		position: sticky;
		top: calc( var( --sv-sticky-top ) + 24px );
	}
}

.servery-checkout__main {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.servery-step {
	min-width: 0;
	margin: 0;
	padding: 20px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius );
	background: var( --sv-surface );
}

.servery-step__title {
	float: left;
	width: 100%;
	margin: 0 0 14px;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	color: var( --sv-ink );
}

.servery-step__title + * {
	clear: both;
}

.servery-step > .servery-field + .servery-check {
	display: flex;
}

.servery-summary {
	padding: 20px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius );
	background: var( --sv-surface );
	box-shadow: var( --sv-shadow );
}

.servery-summary__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.servery-summary__head h2,
.servery-summary > h2 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-summary__head a {
	color: var( --sv-accent );
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.servery-summary__head a:hover {
	text-decoration: underline;
}

.servery-summary .servery-cart {
	margin-bottom: 16px;
}

.servery-summary__terms {
	margin: 12px 0 0;
	color: var( --sv-muted );
	font-size: 0.8125rem;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Table bookings and branch finder
 * ---------------------------------------------------------------------- */

.servery-reservations form {
	display: grid;
	gap: 16px;
}

.servery-reservations__slots {
	margin-top: 16px;
}

.servery-slots {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.servery-slot {
	position: relative;
	cursor: pointer;
}

.servery-slot input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.servery-slot span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var( --sv-line );
	border-radius: 999px;
	background: var( --sv-surface );
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.servery-slot input:checked + span {
	border-color: var( --sv-accent );
	background: var( --sv-accent );
	color: var( --sv-on-accent );
}

.servery-slot input:focus-visible + span {
	box-shadow: 0 0 0 3px var( --sv-accent-line );
}

.servery-success {
	padding: 24px;
	border: 1px solid var( --sv-accent-line );
	border-radius: var( --sv-radius );
	background: var( --sv-accent-soft );
}

.servery-success h2 {
	margin: 0 0 8px;
	font-size: 1.375rem;
}

.servery-success p {
	margin: 0 0 6px;
}

.servery-reservations__result:focus {
	outline: none;
}

.servery-location-finder {
	display: grid;
	gap: 8px;
	margin-bottom: 20px;
}

.servery-row {
	display: flex;
	gap: 10px;
}

.servery-row input {
	flex: 1 1 auto;
}

.servery-heading {
	margin: 24px 0 12px;
	font-size: 1.125rem;
	font-weight: 600;
}

.servery-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var( --sv-line );
}

.servery-list__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var( --sv-line );
}

.servery-list__row > span {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.servery-list__row .servery-muted {
	font-size: 0.875rem;
}

@media ( max-width: 520px ) {
	.servery-list__row {
		flex-direction: column;
		align-items: stretch;
	}
}

/* -------------------------------------------------------------------------
 * Opening hours
 * ---------------------------------------------------------------------- */

.servery-hours {
	margin: 0;
	padding: 0;
	list-style: none;
}

.servery-hours li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px solid var( --sv-line );
	font-variant-numeric: tabular-nums;
}

.servery-hours li.is-today {
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Dish page
 * ---------------------------------------------------------------------- */

.servery-single__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	margin-bottom: 12px;
	color: var( --sv-ink-2 );
	font-weight: 600;
	text-decoration: none;
}

.servery-single__back:hover {
	color: var( --sv-ink );
}

.servery-single__grid {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 24px;
	align-items: start;
}

@media ( min-width: 800px ) {
	.servery-single__grid {
		grid-template-columns: minmax( 0, 1.15fr ) minmax( 0, 1fr );
		gap: 40px;
	}

	.servery-single__grid--no-media {
		grid-template-columns: minmax( 0, 1fr );
		max-width: 640px;
	}
}

.servery-single__media {
	margin: 0;
	border-radius: var( --sv-radius );
	overflow: hidden;
	background: var( --sv-surface-2 );
	aspect-ratio: 4 / 3;
}

.servery-single__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.servery-single__panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.servery-single__price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.servery-single__price .servery-item__now {
	font-size: 1.75rem;
}

.servery-single__lead {
	margin: 0;
	color: var( --sv-ink-2 );
	font-size: 1.0625rem;
	line-height: 1.6;
}

.servery-single__add {
	min-height: 52px;
	font-size: 1rem;
	border-radius: 12px;
}

.servery-single__hint,
.servery-single__muted {
	margin: 0;
	color: var( --sv-muted );
	font-size: 0.875rem;
}

.servery-single__soldout {
	margin: 0;
	padding: 12px 14px;
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface-2 );
	color: var( --sv-ink-2 );
	font-weight: 600;
}

.servery-single__facts {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 120px, 1fr ) );
	gap: 10px;
	margin: 4px 0 0;
}

.servery-single__facts div {
	padding: 12px 14px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius-sm );
}

.servery-single__facts dt {
	color: var( --sv-muted );
	font-size: 0.8125rem;
}

.servery-single__facts dd {
	margin: 2px 0 0;
	font-weight: 600;
}

.servery-single__details {
	display: grid;
	gap: 28px;
	max-width: 720px;
	margin-top: 40px;
}

.servery-single__section h2 {
	margin: 0 0 10px;
	font-size: 1.125rem;
	font-weight: 600;
}

.servery-single__section p {
	margin: 0;
	line-height: 1.65;
}

.servery-single__allergens {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.servery-single__allergens li {
	padding: 4px 12px;
	border-radius: 999px;
	background: var( --sv-warning-soft );
	color: var( --sv-warning );
	font-size: 0.875rem;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Order tracking
 * ---------------------------------------------------------------------- */

.servery-track {
	max-width: 640px;
	margin: 0 auto;
}

.servery-track__head h1 {
	margin: 0;
	font-size: clamp( 1.6rem, 1.3rem + 1.2vw, 2.1rem );
	line-height: 1.2;
}

.servery-track__number {
	margin: 6px 0 24px;
	color: var( --sv-muted );
	font-variant-numeric: tabular-nums;
}

.servery-track__steps {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	counter-reset: servery-step;
}

.servery-track__step {
	position: relative;
	min-height: 44px;
	padding: 0 0 18px 40px;
	color: var( --sv-muted );
	font-weight: 600;
}

.servery-track__step::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 0;
	width: 22px;
	height: 22px;
	border: 2px solid var( --sv-line-strong );
	border-radius: 50%;
	background: var( --sv-surface );
}

.servery-track__step:not( :last-child )::after {
	content: "";
	position: absolute;
	top: 26px;
	bottom: 2px;
	left: 10px;
	width: 2px;
	background: var( --sv-line );
}

.servery-track__step.is-done {
	color: var( --sv-ink );
}

.servery-track__step.is-done::before {
	border-color: var( --sv-accent );
	background: var( --sv-accent ) url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) center / 14px no-repeat;
}

.servery-track__step.is-done:not( :last-child )::after {
	background: var( --sv-accent );
}

.servery-track__step.is-current {
	color: var( --sv-ink );
}

.servery-track__step.is-current::before {
	border-color: var( --sv-accent );
	box-shadow: 0 0 0 4px var( --sv-accent-soft );
}

.servery-track__price {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.servery-track .servery-list__row {
	flex-direction: row;
	align-items: flex-start;
}

.servery-standalone__main {
	max-width: var( --wp--style--global--wide-size, 1200px );
	margin: 0 auto;
	padding: 48px max( 20px, env( safe-area-inset-left ) );
}

.servery-track__eta {
	margin: 0 0 24px;
	padding: 12px 14px;
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface-2 );
	font-weight: 600;
}

.servery-track__items h2 {
	margin: 0 0 8px;
}

.servery-track__again {
	margin-top: 24px;
}

.servery-track-form {
	display: grid;
	gap: 10px;
	max-width: 480px;
}

/* -------------------------------------------------------------------------
 * Toast
 * ---------------------------------------------------------------------- */

.servery-toast {
	position: fixed;
	left: 50%;
	bottom: max( 96px, calc( env( safe-area-inset-bottom ) + 96px ) );
	z-index: 100001;
	max-width: min( 92vw, 440px );
	padding: 12px 18px;
	border-radius: 12px;
	background: var( --sv-ink );
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.45;
	box-shadow: var( --sv-shadow-lg );
	transform: translateX( -50% );
	animation: servery-toast-in 0.2s ease-out;
	transition: opacity 0.3s ease;
}

.servery-toast.is-leaving {
	opacity: 0;
}

@keyframes servery-toast-in {
	from {
		opacity: 0;
		transform: translate( -50%, 8px );
	}
}

/* -------------------------------------------------------------------------
 * Motion
 * ---------------------------------------------------------------------- */

@media ( prefers-reduced-motion: reduce ) {
	.servery-menu *,
	.servery-cart,
	.servery-cart *,
	.servery-cart-toggle,
	.servery-cart-backdrop,
	.servery-sheet *,
	.servery-toast,
	.servery-skeleton__card span {
		animation: none !important;
		transition: none !important;
	}

	.servery-button.is-busy::after,
	.servery-add.is-busy::after,
	.servery-loading::before {
		animation: servery-spin 1.6s linear infinite !important;
	}
}

.servery-track .servery-list {
	border-top: 0;
	font-size: 0.9375rem;
}

.servery-track .servery-cart__totals {
	padding-top: 4px;
}

.servery-track .servery-cart__row--total {
	margin-top: 0;
	border-top: 0;
}

/*
 * Many themes underline every link inside post content with a selector
 * like `.entry-content a`. These are buttons and chips, not prose links.
 */
.servery-menu a.servery-menu__navlink,
.servery-menu a.servery-item__link,
.servery-checkout a.servery-button,
.servery-cart a.servery-button,
.servery-track a.servery-button,
.servery-single a.servery-single__back,
.servery-summary .servery-summary__head a,
.servery-empty a.servery-button {
	text-decoration: none;
}

.servery-menu a.servery-item__link:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Field errors, tooltips, toast actions
 * ---------------------------------------------------------------------- */

.servery-field__error {
	margin: 0;
	color: var( --sv-danger );
	font-size: 0.875rem;
	font-weight: 500;
}

.servery-step > .servery-field__error {
	margin-top: 8px;
}

.servery-checkout [aria-invalid="true"] {
	border-color: var( --sv-danger ) !important;
}

/* Spinners wait 100ms, so quick answers never flash a loader. */
.servery-button.is-busy::after,
.servery-add.is-busy::after {
	opacity: 0;
	animation: servery-spin 0.7s linear infinite, servery-appear 0s linear 0.1s forwards;
}

@keyframes servery-appear {
	to {
		opacity: 1;
	}
}

/* Icon-only buttons name themselves on hover and on keyboard focus.
 * The sheet's close button is already absolutely positioned, which anchors
 * its tooltip; making it relative would drop it out of the corner. */
.servery-icon-button,
.servery-qty button {
	position: relative;
}

.servery-icon-button::after,
.servery-sheet__close::after,
.servery-qty button::after {
	content: attr( aria-label );
	position: absolute;
	top: calc( 100% + 6px );
	left: 50%;
	z-index: 5;
	padding: 4px 8px;
	border-radius: 6px;
	background: var( --sv-ink );
	color: #fff;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate( -50%, -2px );
	transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.servery-sheet__close::after,
.servery-cart__head .servery-icon-button::after {
	left: auto;
	right: 0;
	transform: translateY( -2px );
}

.servery-icon-button:focus-visible::after,
.servery-sheet__close:focus-visible::after,
.servery-qty button:focus-visible::after {
	opacity: 1;
	transform: translate( -50%, 0 );
}

.servery-sheet__close:focus-visible::after,
.servery-cart__head .servery-icon-button:focus-visible::after {
	transform: none;
}

@media ( hover: hover ) {
	.servery-icon-button:hover::after,
	.servery-sheet__close:hover::after,
	.servery-qty button:hover::after {
		opacity: 1;
		transform: translate( -50%, 0 );
		transition-delay: 0.3s;
	}

	.servery-sheet__close:hover::after,
	.servery-cart__head .servery-icon-button:hover::after {
		transform: none;
	}
}

.servery-sheet__foot .servery-qty button::after {
	top: auto;
	bottom: calc( 100% + 6px );
}

.servery-toast {
	display: flex;
	align-items: center;
	gap: 16px;
}

.servery-toast__action {
	flex: 0 0 auto;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid rgba( 255, 255, 255, 0.35 );
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.servery-toast__action:hover {
	background: rgba( 255, 255, 255, 0.12 );
}

.servery-toast__action:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.servery-cart__empty .servery-button {
	margin-top: 16px;
}

/* -------------------------------------------------------------------------
 * Savings: promo codes and reward points in the checkout summary.
 * ---------------------------------------------------------------------- */
.servery-savings {
	border-top: 1px solid var( --sv-line );
	padding-block: 14px;
	font-size: 0.875rem;
}

.servery-savings__panel > summary {
	cursor: pointer;
	color: var( --sv-accent );
	font-weight: 600;
	list-style: none;
	min-height: 32px;
	display: flex;
	align-items: center;
}

.servery-savings__panel > summary::-webkit-details-marker {
	display: none;
}

.servery-savings__panel > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate( 45deg ) translateY( -2px );
	transition: transform 0.15s var( --sv-ease );
}

.servery-savings__panel[open] > summary::after {
	transform: rotate( -135deg );
}

.servery-savings__panel[open] > summary {
	margin-bottom: 8px;
}

.servery-savings__title {
	margin: 0 0 2px;
	font-weight: 600;
	color: var( --sv-ink );
}

.servery-savings__meta {
	margin: 0 0 10px;
	color: var( --sv-muted );
}

.servery-savings .servery-field {
	margin: 0;
}

.servery-inline {
	display: flex;
	gap: 8px;
}

.servery-inline input {
	flex: 1 1 auto;
	min-width: 0;
}

.servery-inline .servery-button {
	flex: 0 0 auto;
}

.servery-savings__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin-top: 6px;
}

.servery-link {
	background: none;
	border: 0;
	padding: 6px 0;
	min-height: 32px;
	font: inherit;
	color: var( --sv-accent );
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.servery-link:focus-visible {
	outline: 2px solid var( --sv-accent );
	outline-offset: 2px;
	border-radius: 4px;
}

.servery-codes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.servery-codes:not( :empty ) {
	margin-top: 10px;
}

.servery-code {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 4px 2px 12px;
	border-radius: 999px;
	background: var( --sv-success-soft );
	color: var( --sv-success );
	font-weight: 600;
	letter-spacing: 0.02em;
}

.servery-code button {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.servery-code button svg {
	width: 16px;
	height: 16px;
}

.servery-code button:hover {
	background: color-mix( in srgb, var( --sv-success ) 12%, transparent );
}

/*
 * Some classic themes (Astra, Kadence, GeneratePress) give `.alignwide`
 * negative margins on small screens, which pushes the menu to the very edge
 * of the phone. A wide alignment means nothing at phone width, so sit inside
 * the theme's content padding there.
 */
@media ( max-width: 921px ) {
	.servery-menu.alignwide,
	.servery-checkout.alignwide,
	.servery-tracking.alignwide,
	.servery-reservations.alignwide,
	.servery-locations.alignwide,
	.servery-rewards.alignwide,
	.servery-single.alignwide {
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: auto !important;
		max-width: 100% !important;
	}
}

/* -------------------------------------------------------------------------
 * Rewards page
 * ---------------------------------------------------------------------- */
.servery-rewards {
	container-type: inline-size;
	color: var( --sv-ink );
}

.servery-rewards__hero {
	display: grid;
	gap: 24px;
	padding: 24px;
	margin-bottom: 32px;
	border: 1px solid var( --sv-line );
	border-radius: var( --sv-radius );
	background: var( --sv-surface );
	box-shadow: var( --sv-shadow );
}

@container ( min-width: 640px ) {
	.servery-rewards__hero {
		grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1.3fr );
		padding: 32px;
	}
}

.servery-rewards__eyebrow {
	margin: 0;
	color: var( --sv-muted );
	font-size: 0.875rem;
	font-weight: 600;
}

.servery-rewards__balance {
	margin: 4px 0;
	font-size: clamp( 2.5rem, 2rem + 3vw, 3.5rem );
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.servery-rewards__worth {
	margin: 0;
	color: var( --sv-success );
	font-weight: 600;
}

.servery-rewards__how {
	padding: 20px;
	border-radius: var( --sv-radius-sm );
	background: var( --sv-surface-2 );
}

.servery-rewards__how-title {
	margin: 0 0 8px;
	font-weight: 600;
}

.servery-rewards__how ul {
	margin: 0 0 16px;
	padding-left: 1.2em;
	color: var( --sv-ink-2 );
	line-height: 1.6;
}

.servery-rewards__section {
	margin-bottom: 32px;
}

.servery-rewards__title {
	margin: 0 0 12px;
	font-size: 1.25rem;
	font-weight: 600;
}

.servery-ledger {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var( --sv-line );
}

.servery-ledger__row {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	grid-template-areas: "what points" "when points";
	gap: 2px 16px;
	padding: 12px 0;
	border-bottom: 1px solid var( --sv-line );
}

.servery-ledger__what {
	grid-area: what;
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
}

.servery-ledger__what span {
	color: var( --sv-ink-2 );
}

.servery-ledger__when {
	grid-area: when;
	color: var( --sv-muted );
	font-size: 0.875rem;
}

.servery-ledger__points {
	grid-area: points;
	align-self: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.servery-ledger__points.is-positive {
	color: var( --sv-success );
}

.servery-ledger__points.is-negative {
	color: var( --sv-ink-2 );
}

.servery-table-scroll {
	overflow-x: auto;
}

.servery-orders {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.servery-orders th,
.servery-orders td {
	padding: 12px 8px;
	border-bottom: 1px solid var( --sv-line );
	text-align: left;
	white-space: nowrap;
}

.servery-orders th {
	color: var( --sv-muted );
	font-size: 0.8125rem;
	font-weight: 600;
}

.servery-orders__num {
	text-align: right !important;
	font-variant-numeric: tabular-nums;
}

.servery-orders a {
	color: var( --sv-accent );
	font-weight: 600;
}

.servery-status {
	display: inline-flex;
	padding: 2px 10px;
	border-radius: 999px;
	background: var( --sv-surface-2 );
	color: var( --sv-ink-2 );
	font-size: 0.8125rem;
	font-weight: 600;
}

.servery-status--success {
	background: var( --sv-success-soft );
	color: var( --sv-success );
}

.servery-status--warning {
	background: var( --sv-warning-soft );
	color: var( --sv-warning );
}

.servery-status--danger {
	background: var( --sv-danger-soft );
	color: var( --sv-danger );
}

/* Open now / closed now badge. */
.servery-open-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.875rem;
}

.servery-open-status__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.servery-open-status.is-open {
	background: var( --sv-success-soft );
	color: var( --sv-success );
}

.servery-open-status.is-closed {
	background: var( --sv-surface-2 );
	color: var( --sv-ink-2 );
}

.servery-savings__error {
	margin: 6px 0 0;
	color: var( --sv-danger );
	font-size: 0.875rem;
	font-weight: 500;
}

/* Theme-proofing: classic themes restyle every <button>, <table> and <ul>. */
.servery-checkout .servery-link,
.servery-checkout .servery-link:hover,
.servery-checkout .servery-link:focus,
.servery-checkout .servery-link:active {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 6px 0 !important;
	color: var( --sv-accent ) !important;
	font-size: inherit !important;
	line-height: 1.4 !important;
}

.servery-checkout .servery-code button,
.servery-checkout .servery-code button:hover,
.servery-checkout .servery-code button:focus {
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	min-height: 0;
	line-height: 1 !important;
}

.servery-checkout .servery-code button:not( :hover ) {
	background: transparent !important;
}

.servery-rewards .servery-button {
	text-decoration: none !important;
}

.servery-rewards__hero {
	align-items: start;
}

.servery-rewards .servery-ledger,
.servery-rewards__how ul {
	margin-left: 0 !important;
}

.servery-rewards__how ul {
	padding-left: 1.2em !important;
}

.servery-rewards .servery-orders,
.servery-rewards .servery-orders th,
.servery-rewards .servery-orders td {
	border: 0 !important;
	background: transparent;
}

.servery-rewards .servery-orders tr {
	border-bottom: 1px solid var( --sv-line ) !important;
}

/* Theme paragraph and list margins win on specificity; restate ours. */
.servery-rewards .servery-rewards__eyebrow { margin: 0; }
.servery-rewards .servery-rewards__balance { margin: 4px 0 6px; }
.servery-rewards .servery-rewards__worth { margin: 0; }
.servery-rewards .servery-rewards__how-title { margin: 0 0 8px; }
.servery-rewards .servery-rewards__how ul { margin: 0 0 16px; }
.servery-rewards ul.servery-ledger { margin: 0 !important; padding: 0 !important; }
.servery-checkout .servery-savings p.servery-savings__title { margin: 0 0 2px; }
.servery-checkout .servery-savings p.servery-savings__meta { margin: 0 0 10px; }
.servery-checkout .servery-savings p.servery-field__hint { margin: 6px 0 0; }

@container ( max-width: 520px ) {
	.servery-rewards .servery-orders__date {
		display: none;
	}

	.servery-rewards .servery-orders th,
	.servery-rewards .servery-orders td {
		padding: 10px 6px;
		white-space: normal;
	}
}

/* Classic themes paint every <button>; keep the sheet's close button ours. */
.servery-sheet .servery-sheet__close,
.servery-sheet .servery-sheet__close:hover,
.servery-sheet .servery-sheet__close:focus {
	padding: 0 !important;
	border: 1px solid var( --sv-line ) !important;
	border-radius: 50% !important;
	background: var( --sv-surface ) !important;
	color: var( --sv-ink ) !important;
	box-shadow: 0 1px 2px rgba( 28, 25, 23, 0.08 ) !important;
	line-height: 1 !important;
}
