/*
Theme Name: e-meniu V2
Description: Lightweight custom block theme foundation for e-meniu V2.
Version: 0.16.3-rc1
Author: e-meniu
Requires at least: 7.1
Requires PHP: 7.4
Text Domain: e-meniu-theme
Tags: block-patterns, full-site-editing, wide-blocks
*/

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	color-scheme: light;
}

body {
	margin: 0;
	overflow-wrap: break-word;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.wp-site-blocks {
	min-height: 100svh;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--olive);
	outline-offset: 3px;
}

.wp-element-button,
.wp-block-button__link,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--interactive--target-min);
	white-space: normal;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--olive);
	background: transparent;
	color: var(--wp--preset--color--olive);
}

.wp-block-button.is-style-e-meniu-ghost > .wp-block-button__link {
	border-color: transparent;
	background: transparent;
	color: var(--wp--preset--color--olive);
	padding-inline: var(--wp--preset--spacing--sm);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

@media (hover: hover) {
	.wp-block-button.is-style-outline > .wp-block-button__link:hover,
	.wp-block-button.is-style-e-meniu-ghost > .wp-block-button__link:hover {
		border-color: var(--wp--preset--color--text);
		background: var(--wp--preset--color--surface-soft);
		color: var(--wp--preset--color--text);
		text-decoration: none;
	}
}

:where(
	input:not([type="button"]):not([type="checkbox"]):not([type="hidden"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
	select,
	textarea
) {
	width: 100%;
	max-width: 100%;
	min-height: var(--wp--custom--interactive--target-min);
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	line-height: 1.4;
	padding: 0.7rem 0.875rem;
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

select {
	padding-right: 2.5rem;
}

::placeholder {
	color: var(--wp--preset--color--text-muted);
	opacity: 1;
}

:where(input, select, textarea):focus-visible {
	border-color: var(--wp--preset--color--olive);
	box-shadow: 0 0 0 2px var(--wp--preset--color--surface), 0 0 0 5px var(--wp--preset--color--olive);
}

:where(input, select, textarea):disabled {
	cursor: not-allowed;
	opacity: 0.65;
}

input[type="checkbox"],
input[type="radio"] {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--wp--preset--color--olive);
}

.e-meniu-form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--lg);
}

.e-meniu-field {
	display: grid;
	gap: var(--wp--preset--spacing--xs);
	min-width: 0;
}

.e-meniu-field > label,
.e-meniu-choice-set legend {
	font-weight: 650;
}

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

.e-meniu-choice-set {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0;
	border: 0;
}

.e-meniu-choice-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--lg);
	margin-top: var(--wp--preset--spacing--xs);
}

.e-meniu-choice {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--interactive--target-min);
	gap: var(--wp--preset--spacing--xs);
}

.wp-block-group.is-style-e-meniu-card,
.wp-block-group.is-style-e-meniu-compact-card {
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--custom--shadow--card);
}

.wp-block-group.is-style-e-meniu-card {
	padding: var(--wp--preset--spacing--lg);
}

.wp-block-group.is-style-e-meniu-compact-card {
	padding: var(--wp--preset--spacing--md);
}

.wp-block-group.is-style-e-meniu-notice,
.wp-block-group.is-style-e-meniu-notice-success,
.wp-block-group.is-style-e-meniu-notice-error {
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-left-width: 4px;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
}

.wp-block-group.is-style-e-meniu-notice {
	border-left-color: var(--wp--preset--color--olive);
}

.wp-block-group.is-style-e-meniu-notice-success {
	border-left-color: var(--wp--preset--color--success);
}

.wp-block-group.is-style-e-meniu-notice-error {
	border-left-color: var(--wp--preset--color--error);
}

p.is-style-e-meniu-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	min-height: 1.75rem;
	margin: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface-soft);
	color: var(--wp--preset--color--olive);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--sm);
	text-transform: uppercase;
}

.wp-block-details > summary {
	display: list-item;
	align-items: center;
	min-height: var(--wp--custom--interactive--target-min);
	cursor: pointer;
	font-weight: 700;
}

.wp-block-details[open] > summary {
	margin-bottom: var(--wp--preset--spacing--sm);
}

.wp-block-image.is-style-e-meniu-rounded img {
	border-radius: var(--wp--custom--radius--large);
}

.wp-block-group.is-style-e-meniu-container,
.wp-block-group.is-style-e-meniu-wide-container {
	width: 100%;
	margin-inline: auto;
}

.wp-block-group.is-style-e-meniu-container {
	max-width: var(--wp--style--global--content-size);
}

.wp-block-group.is-style-e-meniu-wide-container {
	max-width: var(--wp--style--global--wide-size);
}

.e-meniu-token-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
	gap: var(--wp--preset--spacing--sm);
}

.e-meniu-token-swatch {
	display: grid;
	gap: var(--wp--preset--spacing--xs);
	min-width: 0;
	padding: var(--wp--preset--spacing--xs);
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
}

.e-meniu-token-swatch__color {
	height: 4rem;
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--radius--small);
}

.e-meniu-token-swatch code {
	white-space: normal;
	word-break: break-word;
}

@media (min-width: 48rem) {
	.e-meniu-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wp-block-group.is-style-e-meniu-card {
		padding: var(--wp--preset--spacing--xl);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
