/**
 * Enquiry modal.
 *
 * Design notes:
 * - The progress indicator is a module coupling bar, not dots. Seete's product
 *   is assembled from linked modules on site; the steps read the same way.
 * - Borders, never shadows, on anything inside the dialog — consistent with the
 *   rest of the theme. The only shadow in the system is the modal's own.
 * - All colour comes from theme.json presets, so the modal cannot drift from
 *   the brand.
 */

/* --- Dialog shell ----------------------------------------------------------- */

/* Display text is set, not typeset by the browser: auto-hyphenation breaks
   headings mid-word ("ei-ner") and reads as a rendering fault. Body copy in the
   modal is short enough not to need it either. */
.seete-modal,
.seete-modal__promise,
.seete-step__title,
.seete-topic__label,
.seete-topic__hint {
	hyphens: manual;
	-webkit-hyphens: manual;
}

.seete-modal {
	width: min(62rem, calc(100vw - 2rem));
	max-height: min(46rem, calc(100vh - 2rem));
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--md, 4px);
	background: var(--wp--preset--color--surface-000);
	color: var(--wp--preset--color--ink-700);
	box-shadow: 0 8px 32px rgb(26 22 20 / 0.18);
	overflow: hidden;
}

.seete-modal::backdrop {
	background: rgb(26 22 20 / 0.55);
}

.seete-modal[open] {
	animation: seete-modal-in 200ms cubic-bezier(0.2, 0, 0.2, 1);
}

.seete-modal[open]::backdrop {
	animation: seete-fade-in 200ms ease;
}

@keyframes seete-modal-in {
	from { opacity: 0; transform: scale(0.98) translateY(6px); }
	to   { opacity: 1; transform: none; }
}

@keyframes seete-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.seete-modal__shell {
	display: grid;
	grid-template-columns: 16.5rem 1fr;
	min-height: 0;
	max-height: inherit;
}


/* --- Left rail -------------------------------------------------------------- */

.seete-modal__rail {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem 1.75rem;
	background: var(--wp--preset--color--brand-700);
	color: var(--wp--preset--color--surface-000);
}

.seete-modal__eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.75;
}

.seete-modal__promise {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.25;
}

.seete-modal__aside,
.seete-modal__phone {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.55;
	opacity: 0.85;
}

.seete-modal__phone {
	margin-top: auto;
	opacity: 1;
}

.seete-modal__phone a {
	color: inherit;
	font-weight: 600;
	text-underline-offset: 0.25em;
}


/* --- Module coupling bar (signature) ----------------------------------------
   Three segments that lock together as the enquiry is assembled. The connector
   between boxes is the coupling; it fills once the step behind it is done.
   --------------------------------------------------------------------------- */

.seete-modules {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.seete-module {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-block: 0.4rem;
	font-size: 0.875rem;
	color: rgb(255 255 255 / 0.6);
	transition: color 160ms ease;
}

/* The coupling: a vertical bar joining one module to the next. */
.seete-module + .seete-module::before {
	content: "";
	position: absolute;
	left: 0.5rem;
	top: -0.6rem;
	width: 2px;
	height: 1.2rem;
	background: rgb(255 255 255 / 0.25);
	transition: background-color 200ms ease;
}

.seete-module__box {
	position: relative;
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	border: 2px solid rgb(255 255 255 / 0.45);
	background: transparent;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.seete-module__label {
	font-weight: 500;
}

/* Current step: outlined and bright. */
.seete-module.is-current {
	color: var(--wp--preset--color--surface-000);
}

.seete-module.is-current .seete-module__box {
	border-color: var(--wp--preset--color--surface-000);
}

/* Completed: filled solid, and its coupling to the next module is engaged. */
.seete-module.is-done {
	color: rgb(255 255 255 / 0.85);
}

.seete-module.is-done .seete-module__box {
	background: var(--wp--preset--color--surface-000);
	border-color: var(--wp--preset--color--surface-000);
}

.seete-module.is-done + .seete-module::before {
	background: var(--wp--preset--color--surface-000);
}


/* --- Body ------------------------------------------------------------------- */

.seete-modal__body {
	position: relative;
	display: flex;
	min-height: 0;
}

.seete-modal__form {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 0;
}

.seete-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--sm, 2px);
	background: transparent;
	color: var(--wp--preset--color--ink-500);
	cursor: pointer;
	transition: background-color 120ms ease, color 120ms ease;
}

.seete-modal__close:hover {
	background: var(--wp--preset--color--surface-100);
	color: var(--wp--preset--color--ink-900);
}

.seete-modal__close svg {
	width: 1.125rem;
	height: 1.125rem;
}


/* --- Steps ------------------------------------------------------------------ */

.seete-step {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 2.25rem 2.25rem 1rem;
}

.seete-step[hidden] {
	display: none;
}

.seete-step.is-entering {
	animation: seete-step-in 180ms cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes seete-step-in {
	from { opacity: 0; transform: translateX(10px); }
	to   { opacity: 1; transform: none; }
}

.seete-step__title {
	margin: 0 0 0.25rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--ink-900);
}

.seete-step__title:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-500);
	outline-offset: 4px;
}

.seete-step__lead {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-500);
}

.seete-step__lead a {
	color: var(--wp--preset--color--brand-700);
	font-weight: 600;
}


/* --- Topic cards ------------------------------------------------------------ */

.seete-topics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	/* Every row the same height, so a card with a longer label cannot make its
	   own row taller than its neighbours. */
	grid-auto-rows: 1fr;
	gap: 0.75rem;
	align-items: stretch;
}

@media (max-width: 900px) {
	.seete-topics {
		grid-template-columns: repeat(2, 1fr);
	}
}

.seete-topic {
	position: relative;
	display: flex;
	cursor: pointer;
}

.seete-topic input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.seete-topic__inner {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1.125rem 1rem;
	border: 1px solid var(--wp--preset--color--line-200);
	border-radius: var(--wp--custom--radius--md, 4px);
	background: var(--wp--preset--color--surface-000);
	transition: border-color 140ms ease, background-color 140ms ease;
}

.seete-topic:hover .seete-topic__inner {
	border-color: var(--wp--preset--color--brand-500);
	background: var(--wp--preset--color--brand-050);
}

.seete-topic input:focus-visible + .seete-topic__inner {
	outline: 2px solid var(--wp--preset--color--brand-500);
	outline-offset: 2px;
}

.seete-topic input:checked + .seete-topic__inner {
	border-color: var(--wp--preset--color--brand-700);
	background: var(--wp--preset--color--brand-050);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--brand-700);
}

/* Scoped to the modal. A bare `.seete-icon` rule here would win over the
   services grid — this file loads after style.css — and pin the icon to
   burgundy, making it invisible on a burgundy hover plate. The icon set is
   shared, so its colour must always come from the context it sits in. */
.seete-topic .seete-icon {
	width: 2.5rem;
	height: 2.5rem;
	color: var(--wp--preset--color--brand-700);
}

.seete-topic__label {
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-900);
	line-height: 1.3;
}

.seete-topic__hint {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--ink-500);
	line-height: 1.35;
}


/* --- Fields ----------------------------------------------------------------- */

.seete-field {
	margin-bottom: 1.125rem;
}

.seete-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.seete-field label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink-900);
}

.seete-field abbr,
.seete-consent abbr {
	color: var(--wp--preset--color--error);
	text-decoration: none;
	border: 0;
}

.seete-field input,
.seete-field textarea {
	width: 100%;
	padding: 0.6875rem 0.75rem;
	border: 1px solid var(--wp--preset--color--line-200);
	border-radius: var(--wp--custom--radius--sm, 2px);
	background: var(--wp--preset--color--surface-000);
	color: var(--wp--preset--color--ink-900);
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color 120ms ease;
}

.seete-field input::placeholder,
.seete-field textarea::placeholder {
	color: var(--wp--preset--color--ink-300);
}

.seete-field input:focus-visible,
.seete-field textarea:focus-visible {
	border-color: var(--wp--preset--color--brand-700);
	outline: 2px solid var(--wp--preset--color--brand-500);
	outline-offset: 1px;
}

.seete-field input[aria-invalid="true"],
.seete-field textarea[aria-invalid="true"] {
	border-color: var(--wp--preset--color--error);
}

.seete-hint {
	margin: 0.375rem 0 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--ink-500);
}

.seete-consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	margin-top: 0.5rem;
}

.seete-consent input {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.15rem;
	accent-color: var(--wp--preset--color--brand-700);
}

.seete-consent label {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--wp--preset--color--ink-700);
}

.seete-consent a {
	color: var(--wp--preset--color--brand-700);
}

.seete-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}


/* --- Errors ----------------------------------------------------------------- */

.seete-error {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--error);
}

.seete-error--form {
	margin: 0 2.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--error);
	border-radius: var(--wp--custom--radius--sm, 2px);
	background: #fdf3f2;
}


/* --- Success ---------------------------------------------------------------- */

.seete-step--done {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}

.seete-done__mark {
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	margin-bottom: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--brand-050);
	color: var(--wp--preset--color--success);
}

.seete-done__mark .seete-icon {
	width: 2rem;
	height: 2rem;
	color: inherit;
}


/* --- Actions ---------------------------------------------------------------- */

.seete-modal__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.125rem 2.25rem;
	border-top: 1px solid var(--wp--preset--color--line-200);
	background: var(--wp--preset--color--surface-050);
}

.seete-modal__spacer {
	flex: 1;
}

.seete-btn {
	padding: 0.75rem 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--sm, 2px);
	background: var(--wp--preset--color--brand-700);
	color: var(--wp--preset--color--surface-000);
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 120ms ease;
}

.seete-btn:hover {
	background: var(--wp--preset--color--brand-800);
}

.seete-btn:active {
	background: var(--wp--preset--color--brand-900);
}

.seete-btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.seete-btn--ghost {
	background: transparent;
	border-color: var(--wp--preset--color--line-200);
	color: var(--wp--preset--color--ink-700);
}

.seete-btn--ghost:hover {
	background: var(--wp--preset--color--surface-100);
	border-color: var(--wp--preset--color--ink-300);
}

.seete-btn[hidden] {
	display: none;
}


/* --- Mobile ----------------------------------------------------------------- */

@media (max-width: 767px) {
	.seete-modal {
		width: 100vw;
		max-width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
	}

	.seete-modal__shell {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.seete-modal__rail {
		gap: 1rem;
		padding: 1.25rem 1.25rem 1rem;
	}

	.seete-modal__promise,
	.seete-modal__aside,
	.seete-modal__phone {
		display: none;
	}

	/* Modules run horizontally, couplings become the links between them. */
	.seete-modules {
		flex-direction: row;
		align-items: center;
		gap: 0;
	}

	.seete-module {
		flex: 1;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.375rem;
		padding-block: 0;
		font-size: 0.75rem;
	}

	.seete-module + .seete-module::before {
		left: auto;
		right: calc(100% - 0.1rem);
		top: 0.5rem;
		width: calc(100% - 1.4rem);
		height: 2px;
	}

	.seete-step {
		padding: 1.5rem 1.25rem 1rem;
	}

	.seete-step__title {
		font-size: 1.5rem;
	}

	.seete-field-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.seete-modal__actions {
		padding: 1rem 1.25rem;
		padding-bottom: max(1rem, env(safe-area-inset-bottom));
	}

	.seete-error--form {
		margin-inline: 1.25rem;
	}
}


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

@media (prefers-reduced-motion: reduce) {
	.seete-modal[open],
	.seete-modal[open]::backdrop,
	.seete-step.is-entering {
		animation: none;
	}

	.seete-module,
	.seete-module__box,
	.seete-module + .seete-module::before,
	.seete-topic__inner,
	.seete-btn {
		transition: none;
	}
}

/* ===========================================================================
   The inline form on /kontakt/
   ===========================================================================
   Lives in this file, not in style.css, for two reasons. It shares .seete-field,
   .seete-topic, .seete-consent and .seete-btn with the modal — one set of form
   styles, one place to change them. And this stylesheet is enqueued after
   style.css, so an override of .seete-topics written over there would lose the
   cascade at equal specificity, which is the collision that broke .seete-step
   and .seete-icon earlier in this rebuild.
   =========================================================================== */

/* Five topics in a three-column grid leaves a hole in the second row. Flex with
   a grow basis lets the last row's cards expand to fill the line instead. */
.seete-topics--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.seete-topics--inline .seete-topic {
	flex: 1 1 12.5rem;
}

.seete-form {
	display: grid;
	gap: var(--wp--preset--spacing--80);
	max-width: 42rem;
}

.seete-form__block {
	margin: 0;
	padding: 0;
	border: 0;
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

/* A legend cannot be a grid item in every engine, so it is taken out of flow
   and spaced by hand. */
.seete-form__legend {
	float: left;
	width: 100%;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0 0 0.6rem;
	border-bottom: 1px solid var(--wp--preset--color--line-200);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-700);
}

.seete-form__legend + * {
	clear: both;
}

.seete-form__alert {
	margin: 0;
	padding: 0.85rem 1rem;
	border-left: 3px solid var(--wp--preset--color--error);
	background: var(--wp--preset--color--surface-100);
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-900);
}

.seete-form__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--50);
	flex-wrap: wrap;
}

.seete-form__note {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--ink-500);
}

/* Confirmation, shown after the redirect. */
.seete-form--done {
	gap: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--80);
	background: var(--wp--preset--color--surface-100);
	border-left: 3px solid var(--wp--preset--color--success);
}

.seete-form__mark {
	color: var(--wp--preset--color--success);
}

.seete-form__mark .seete-icon {
	width: 34px;
	height: 34px;
}

.seete-form__done-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.seete-form--done p {
	margin: 0;
	color: var(--wp--preset--color--ink-700);
}

/* The inline form's errors sit in normal flow rather than being toggled by
   script, so they need the spacing the modal gets from its own rules. */
.seete-form .seete-error {
	margin: 0.4rem 0 0;
}
