/**
 * Mobil fuldskærms-søgeflow — kun max-width: 768px.
 */

@media (max-width: 768px) {
	/* Skjul den gamle feltrække; vis ét klikbart søgefelt. */
	.stowly-mobile-wizard-enabled > .stowly-header-search__segment,
	.stowly-mobile-wizard-enabled > .stowly-header-search__divider,
	.stowly-mobile-wizard-enabled > .stowly-header-search__submit,
	.stowly-mobile-wizard-enabled > .stowly-front-search__field,
	.stowly-mobile-wizard-enabled > .stowly-front-search__divider,
	.stowly-mobile-wizard-enabled > .stowly-front-search__submit {
		display: none !important;
	}

	.stowly-mobile-wizard-enabled {
		display: block;
		width: 100%;
	}

	.stowly-header-search.stowly-mobile-wizard-enabled {
		display: flex;
		align-items: stretch;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	.stowly-front-search.stowly-mobile-wizard-enabled {
		display: block;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	.stowly-mobile-search-trigger {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		width: 100%;
		min-height: 3.25rem;
		padding: 0.375rem 0.375rem 0.375rem 1rem;
		border: 1px solid var(--stowly-border, #e2e8f0);
		border-radius: 999px;
		background: #fff;
		color: var(--stowly-text, #0f172a);
		text-align: left;
		box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.stowly-mobile-search-trigger:focus-visible {
		outline: 2px solid var(--stowly-accent, #2563eb);
		outline-offset: 2px;
	}

	.stowly-mobile-search-trigger__icon,
	.stowly-mobile-search-trigger__chev {
		display: none !important;
	}

	.stowly-mobile-search-trigger__copy {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		gap: 0.125rem;
		min-width: 0;
	}

	.stowly-mobile-search-trigger__text {
		font-size: 0.9375rem;
		font-weight: 600;
		line-height: 1.25;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.stowly-mobile-search-trigger__summary {
		font-size: 0.8125rem;
		line-height: 1.25;
		color: var(--stowly-muted, #64748b);
	}

	.stowly-mobile-search-trigger__action {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.375rem;
		flex: 0 0 auto;
		min-height: 2.25rem;
		padding: 0.4375rem 0.75rem;
		border-radius: 999px;
		background: var(--stowly-color-primary, #006a69);
		color: #fff;
		font-size: 0.8125rem;
		font-weight: 600;
		line-height: 1;
		pointer-events: none;
	}

	.stowly-mobile-search-trigger__action-icon {
		display: block;
		flex: 0 0 auto;
		width: 1rem;
		height: 1rem;
	}

	/* Hero + landing mobil: én pille — fjern ydre «kasse i kasse». */
	:is(.stowly-front-hero, .stowly-landing-hero) .stowly-header-search.stowly-header-search--front-hero.stowly-mobile-wizard-enabled,
	.stowly-archive-intake .stowly-header-search.stowly-mobile-wizard-enabled,
	.stowly-archive-intake .stowly-front-search.stowly-mobile-wizard-enabled {
		padding: 0 !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		gap: 0 !important;
		width: 100%;
		max-width: 100%;
	}

	:is(.stowly-front-hero, .stowly-landing-hero) .stowly-header-search.stowly-mobile-wizard-enabled .stowly-mobile-search-trigger,
	.stowly-archive-intake .stowly-mobile-search-trigger {
		--stowly-hero-search-trigger-h: 3.75rem;
		border-radius: 999px;
		min-height: var(--stowly-hero-search-trigger-h);
		height: var(--stowly-hero-search-trigger-h);
		width: 100%;
		padding: 0.375rem 0.375rem 0.375rem 1.125rem;
		box-shadow:
			0 4px 24px -8px rgb(0 0 0 / 14%),
			0 2px 8px -4px rgb(0 0 0 / 10%);
	}

	:is(.stowly-front-hero, .stowly-landing-hero) .stowly-header-search.stowly-mobile-wizard-enabled .stowly-mobile-search-trigger__text,
	.stowly-archive-intake .stowly-mobile-search-trigger__text {
		font-size: 1rem;
	}

	:is(.stowly-front-hero, .stowly-landing-hero) .stowly-header-search.stowly-mobile-wizard-enabled .stowly-mobile-search-trigger__action,
	.stowly-archive-intake .stowly-mobile-search-trigger__action {
		min-height: calc(var(--stowly-hero-search-trigger-h, 3.75rem) - 0.5rem);
		height: calc(var(--stowly-hero-search-trigger-h, 3.75rem) - 0.5rem);
		padding: 0 0.875rem;
		font-size: 0.875rem;
	}

	.stowly-archive-layout .stowly-header-search.stowly-mobile-wizard-enabled .stowly-mobile-search-trigger {
		border-radius: 999px;
		min-height: var(--stowly-archive-toolbar-control-h, 3rem);
		height: var(--stowly-archive-toolbar-control-h, 3rem);
		padding: 0.3125rem 0.3125rem 0.3125rem 1rem;
	}

	body.stowly-archive-layout .stowly-header-search.stowly-mobile-wizard-enabled .stowly-mobile-search-trigger__action {
		min-height: calc(var(--stowly-archive-toolbar-control-h, 3rem) - 0.5rem);
		height: calc(var(--stowly-archive-toolbar-control-h, 3rem) - 0.5rem);
		padding: 0 0.75rem;
	}

	/* Fuldskærms-wizard */
	html.stowly-mobile-search-wizard-open,
	body.stowly-mobile-search-wizard-open {
		overflow: hidden;
	}

	.stowly-mobile-search-wizard {
		position: fixed;
		inset: 0;
		z-index: 10050;
	}

	.stowly-mobile-search-wizard__backdrop {
		position: absolute;
		inset: 0;
		background: rgb(15 23 42 / 42%);
	}

	.stowly-mobile-search-wizard__panel {
		position: absolute;
		inset: 0;
		display: flex;
		flex-direction: column;
		background: #fff;
		isolation: isolate;
	}

	.stowly-mobile-search-wizard__header {
		display: grid;
		grid-template-columns: 2.5rem 1fr 2.5rem;
		align-items: center;
		gap: 0.5rem;
		flex: 0 0 auto;
		min-height: 3.25rem;
		padding: max(0.5rem, env(safe-area-inset-top)) 0.75rem 0.5rem;
		border-bottom: 1px solid var(--stowly-border, #e2e8f0);
		background: #fff;
	}

	.stowly-mobile-search-wizard__title {
		margin: 0;
		font-size: 1rem;
		font-weight: 700;
		line-height: 1.2;
		text-align: center;
	}

	.stowly-mobile-search-wizard__back,
	.stowly-mobile-search-wizard__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: transparent;
		color: var(--stowly-text, #0f172a);
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.stowly-mobile-search-wizard__back[hidden],
	.stowly-mobile-search-wizard__close[hidden] {
		display: none !important;
	}

	/* Astra's `button:hover { color:#fff }` må ikke gøre pil/kryds usynlige. */
	.stowly-mobile-search-wizard__back:hover,
	.stowly-mobile-search-wizard__back:focus,
	.stowly-mobile-search-wizard__back:focus-visible,
	.stowly-mobile-search-wizard__back:active,
	.stowly-mobile-search-wizard__close:hover,
	.stowly-mobile-search-wizard__close:focus,
	.stowly-mobile-search-wizard__close:focus-visible,
	.stowly-mobile-search-wizard__close:active {
		color: var(--stowly-text, #0f172a) !important;
		background: rgb(15 23 42 / 6%);
		outline: none;
	}

	.stowly-mobile-search-wizard__close {
		grid-column: 3;
	}

	.stowly-mobile-search-wizard__back {
		grid-column: 1;
	}

	.stowly-mobile-search-wizard__location-bar {
		flex: 0 0 auto;
		padding: 0.75rem 1rem 1rem;
		border-bottom: 1px solid var(--stowly-border, #e2e8f0);
		background: #fff;
	}

	.stowly-mobile-search-wizard__location-bar-label {
		margin-bottom: 0.5rem;
	}

	.stowly-mobile-search-wizard__location-bar .stowly-mobile-search-wizard__chip {
		width: 100%;
	}

	.stowly-mobile-search-wizard__body {
		flex: 1 1 auto;
		min-height: 0;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	.stowly-mobile-search-wizard__step {
		display: none;
		min-height: 100%;
	}

	.stowly-mobile-search-wizard__step.is-active {
		display: flex;
		flex-direction: column;
	}

	.stowly-mobile-search-wizard__slot {
		flex: 1 1 auto;
		min-height: 0;
	}

	/* Step 1 — adresse øverst */
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] [data-stowly-location-search] {
		display: flex;
		flex-direction: column;
		min-height: 100%;
		padding: 0.75rem 1rem 1rem;
		border: 0;
		background: transparent;
		position: relative;
	}

	.stowly-mobile-search-wizard__hosted.stowly-header-search__segment--where-inline,
	.stowly-mobile-search-wizard__hosted.stowly-front-search__field--where-inline {
		position: relative;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-header-search__label,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-front-search__label {
		display: none;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-header-search__where-inline,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-front-search__where-inline {
		display: block;
		width: 100%;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-header-search__inline-input,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-front-search__inline-input {
		display: block;
		width: 100%;
		min-height: 3rem;
		padding: 0.75rem 1rem;
		border: 1px solid var(--stowly-border, #e2e8f0);
		border-radius: 0.875rem;
		/* 16px+ forhindrer iOS Safari i at zoome ind ved focus */
		font-size: 16px !important;
		line-height: 1.25;
		background: #fff;
		outline: none;
		box-shadow: none;
		-webkit-tap-highlight-color: transparent;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-header-search__inline-input:focus,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-front-search__inline-input:focus,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-header-search__inline-input:focus-visible,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-front-search__inline-input:focus-visible {
		outline: none;
		box-shadow: none;
		border-color: var(--stowly-border, #e2e8f0);
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-location-search__suggestions {
		position: static !important;
		display: block;
		max-height: none;
		margin-top: 0.5rem;
		border: 0;
		box-shadow: none;
		overflow: visible;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-location-search__suggestion {
		min-height: 3rem;
		padding: 0.75rem 0.875rem;
		border-radius: 0.75rem;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-search-filled .stowly-front-search__inline-input,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-search-filled .stowly-header-search__inline-input {
		padding-right: 2.5rem !important;
	}

	/* × i højre kant af adressefeltet (ikke dynamisk left fra header-pill). */
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="where"] .stowly-search-clear {
		left: auto !important;
		right: 1rem !important;
		top: calc(0.75rem + 1.5rem) !important;
		transform: translateY(-50%) !important;
	}

	/* Step 2 — typer */
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] [data-stowly-multi-menu] {
		position: static !important;
		display: block !important;
		inset: auto !important;
		width: 100% !important;
		max-height: none !important;
		min-height: 0 !important;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		transform: none !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-header-search__menu-footer,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-front-search__menu-footer {
		display: none !important;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-header-search__menu-scroll,
	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-front-search__menu-body {
		max-height: none;
		overflow: visible;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-what-menu {
		padding: 0.5rem 1rem 1rem;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-what-menu__title {
		margin-top: 0;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="what"] .stowly-what-card {
		min-height: 3.25rem;
	}

	/* Step 3 — valgte filtre + startmåned */
	.stowly-mobile-search-wizard__action-intro {
		padding: 1rem 1rem 0.5rem;
	}

	.stowly-mobile-search-wizard__chips-label {
		margin: 0 0 0.625rem;
		font-size: 0.8125rem;
		font-weight: 600;
		color: var(--stowly-muted, #64748b);
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	.stowly-mobile-search-wizard__chips {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}

	.stowly-mobile-search-wizard__chips-empty {
		margin: 0;
		font-size: 0.9375rem;
		line-height: 1.4;
		color: var(--stowly-muted, #475569);
	}

	.stowly-mobile-search-wizard__chip {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		width: 100%;
		min-height: 2.75rem;
		padding: 0.5rem 0.5rem 0.5rem 0.875rem;
		border: 1px solid var(--stowly-border, #e2e8f0);
		border-radius: 0.75rem;
		background: #f8fafc;
		font-size: 0.875rem;
		line-height: 1.25;
	}

	.stowly-mobile-search-wizard__chip-label {
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.stowly-mobile-search-wizard__chip-clear {
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		width: 2rem;
		height: 2rem;
		margin-left: auto;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: transparent;
		color: var(--stowly-muted, #64748b);
		cursor: pointer;
	}

	.stowly-mobile-search-wizard__chip-clear:focus-visible {
		outline: 2px solid var(--stowly-accent, #2563eb);
		outline-offset: 1px;
	}

	.stowly-mobile-search-wizard__when-block {
		padding: 0.5rem 1rem 1rem;
		border-top: 1px solid var(--stowly-border, #e2e8f0);
		margin-top: 0.75rem;
	}

	.stowly-mobile-search-wizard__when-label {
		margin: 0 0 0.75rem;
		font-size: 0.9375rem;
		font-weight: 600;
	}

	.stowly-mobile-search-wizard__optional {
		font-weight: 400;
		color: var(--stowly-muted, #64748b);
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="when"] [data-dropdown-menu] {
		position: static !important;
		display: block !important;
		inset: auto !important;
		width: 100% !important;
		max-height: none !important;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		transform: none !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="when"] .stowly-when-menu__cards {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.stowly-mobile-search-wizard__slot[data-stowly-wizard-slot="when"] .stowly-when-card {
		min-height: 2.75rem;
	}

	.stowly-mobile-search-wizard__footer {
		flex: 0 0 auto;
		padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
		border-top: 1px solid var(--stowly-border, #e2e8f0);
		background: #fff;
	}

	.stowly-mobile-search-wizard__next {
		width: 100%;
		min-height: 3rem;
	}

	.stowly-mobile-search-wizard__loading {
		position: absolute;
		inset: 0;
		z-index: 10;
		display: none;
		place-items: center;
		margin: 0;
		padding: 24px;
		background-color: rgb(253, 250, 248);
	}

	.stowly-mobile-search-wizard--submitting .stowly-mobile-search-wizard__loading {
		display: grid;
	}

	.stowly-mobile-search-wizard__loading-inner {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 20px;
	}

	.stowly-mobile-search-wizard__loading-ring {
		width: 52px;
		height: 52px;
		border-radius: 50%;
		border: 3px solid rgba(var(--stowly-color-primary-rgb), 0.14);
		border-top-color: var(--stowly-color-primary);
		animation: stowly-mobile-search-wizard-spin 0.78s linear infinite;
		box-sizing: border-box;
	}

	.stowly-mobile-search-wizard__loading-text {
		margin: 0;
		font-size: 0.9375rem;
		font-weight: 600;
		color: var(--stowly-color-ink-soft, #717171);
	}

	@keyframes stowly-mobile-search-wizard-spin {
		to {
			transform: rotate(360deg);
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.stowly-mobile-search-wizard__loading-ring {
			animation-duration: 1.6s;
		}
	}
}

@media (min-width: 769px) {
	.stowly-mobile-search-wizard {
		display: none !important;
	}

	.stowly-mobile-search-trigger {
		display: none !important;
	}
}
