/* Shared components: loaded on the front end and in the block editor, so previews match. */

:root {
	--vlm-error: #9b2c1f;
	/* Section labels (eyebrows), step and index numbers, small uppercase headings. */
	--vlm-label-size: 0.875rem;
}

/* Section label above a heading ("Browse · Floors & services"). */
.vlm-eyebrow {
	margin: 0 0 var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--highlight);
	font-size: var(--vlm-label-size);
	font-weight: 500;
	line-height: 1.55;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vlm-section-title {
	margin: 0 0 var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	letter-spacing: -0.015em;
}

/* Buttons and text actions. theme.json styles core buttons; these classes cover theme markup. */

.vlm-button,
.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 3.125rem;
	padding: 0.75rem 1.5rem;
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	background: var(--wp--preset--color--accent);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius-pill);
	cursor: pointer;
	transition: background-color var(--wp--custom--transition), border-color var(--wp--custom--transition), color var(--wp--custom--transition);
	appearance: none;
}

.vlm-button:hover,
.search-submit:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--accent-deep);
	border-color: var(--wp--preset--color--accent-deep);
}

.vlm-button:active,
.search-submit:active {
	filter: brightness(0.9);
}

.vlm-button--secondary {
	color: var(--wp--preset--color--contrast);
	background: transparent;
	border-color: var(--wp--preset--color--contrast);
}

.vlm-button--secondary:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

.vlm-button:disabled,
.vlm-button[aria-disabled="true"] {
	opacity: 0.45;
	pointer-events: none;
}

.vlm-button .vlm-icon {
	width: 1rem;
	height: 1rem;
	transition: transform var(--wp--custom--transition);
}

.vlm-button:hover .vlm-icon {
	transform: translateX(3px);
}

.vlm-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-decoration: none;
}

.vlm-link-arrow .vlm-icon {
	width: 1.125rem;
	height: 1.125rem;
	transition: transform var(--wp--custom--transition);
}

.vlm-link-arrow:hover {
	color: var(--wp--preset--color--accent);
}

.vlm-link-arrow:hover .vlm-icon {
	transform: translateX(3px);
}

/* Forms */

label {
	display: block;
	margin-block-end: 0.375rem;
	font-weight: 500;
}

/* Form field labels: small uppercase, as on the booking form. */
.vlm-field > label,
.vlm-field > legend {
	color: var(--wp--preset--color--muted);
	font-size: var(--vlm-label-size);
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="hidden"], [type="file"], [type="range"], [type="color"]),
textarea,
select {
	width: 100%;
	min-height: var(--wp--custom--control-height);
	padding: 0.625rem 0.875rem;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
	transition: border-color var(--wp--custom--transition), box-shadow var(--wp--custom--transition);
}

input::placeholder,
textarea::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
	border-color: var(--wp--preset--color--contrast);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	border-color: var(--wp--preset--color--contrast);
	outline-offset: 1px;
}

select {
	padding-inline-end: 2.75rem;
	background: var(--wp--preset--color--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1D1A' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.875rem center / 1rem;
	cursor: pointer;
	appearance: none;
}

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

input[type="checkbox"],
input[type="radio"] {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	accent-color: var(--wp--preset--color--accent);
	cursor: pointer;
}

input[type="file"] {
	max-width: 100%;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
}

input[type="file"]::file-selector-button {
	margin-inline-end: 1rem;
	padding: 0.625rem 1rem;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-weight: 500;
	background: transparent;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius-pill);
	cursor: pointer;
}

:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

/* Error state must win over hover/focus border colours. */
[aria-invalid="true"] {
	border-color: var(--vlm-error) !important;
}

.vlm-field {
	display: grid;
	gap: 0.375rem;
	margin-block-end: var(--wp--preset--spacing--50);
}

.vlm-field > label {
	margin: 0;
}

.vlm-field__required {
	color: var(--vlm-error);
}

.vlm-field__help {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.vlm-field__error {
	margin: 0;
	color: var(--vlm-error);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.vlm-check {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.vlm-check input {
	margin-block-start: 0.2rem;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 34rem;
}

.search-form label {
	flex: 1;
	margin: 0;
}


/* Neutral stand-in where a product or category has no image. */
.vlm-media-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 100%;
	color: var(--wp--preset--color--line-strong);
	background: var(--wp--preset--color--surface-strong);
}

.vlm-media-placeholder .vlm-icon {
	width: 2rem;
	height: 2rem;
	opacity: 0.55;
}
