/**
 * ALR-123 Fejlveje — 404, product search with/without results and the empty
 * cart, as in mockup round 4 screens 18, 16, 17 and 10. Loaded only on those
 * surfaces (Allure_Error_Paths::enqueue). Tokens only (--allure-ds-*).
 */

.allure-errorpath {
	--ep-wrap: calc(var(--allure-ds-container-wide) + 2 * var(--allure-ds-gutter));
	color: var(--allure-ds-color-text);
	font-family: var(--allure-ds-font-body);
}

.allure-errorpath h1,
.allure-errorpath h2,
.allure-errorpath__hero h1,
.allure-errorpath__bridge h2,
.allure-errorpath__popular h2 {
	margin: 0;
	color: var(--allure-ds-color-ink);
	font-family: var(--allure-ds-font-display);
	font-weight: 400;
	line-height: var(--allure-ds-line-height-heading);
	letter-spacing: var(--allure-ds-letter-spacing-heading);
	text-transform: none;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.allure-errorpath p { margin: 0; }

.allure-errorpath__eyebrow,
.allure-errorpath .allure-errorpath__eyebrow {
	display: block;
	margin: 0 0 var(--allure-ds-space-3);
	color: var(--allure-ds-color-accent);
	font-family: var(--allure-ds-font-body);
	font-size: var(--allure-ds-font-size-meta);
	font-weight: 700;
	letter-spacing: var(--allure-ds-letter-spacing-meta);
	text-transform: uppercase;
}

.allure-errorpath__muted { color: var(--allure-ds-color-text-muted); }
.allure-errorpath__small { font-size: var(--allure-ds-font-size-small); }

.allure-errorpath a:focus-visible,
.allure-errorpath button:focus-visible,
.allure-errorpath__hero a:focus-visible,
.allure-errorpath__hero button:focus-visible {
	outline: 3px solid var(--allure-ds-color-focus);
	outline-offset: 3px;
}

/* K1 Sidehoved med søgefelt. Full-bleed warm surface without overflow:
   border-image paints outside the box but adds no scrollable width. */
.allure-errorpath__hero {
	padding-block: var(--allure-ds-section-compact);
	background: var(--allure-ds-color-surface-warm);
	border-image: conic-gradient(var(--allure-ds-color-surface-warm) 0 0) fill 0 / / 0 100vmax;
}

main.allure-errorpath > .allure-errorpath__hero > div,
.allure-errorpath__wrap {
	width: 100%;
	max-width: var(--ep-wrap);
	margin-inline: auto;
	padding-inline: var(--allure-ds-gutter);
	box-sizing: border-box;
}

.allure-errorpath__hero h1 {
	max-width: 14ch;
	font-size: var(--allure-ds-font-size-h1);
}

.allure-errorpath--search .allure-errorpath__hero h1 { max-width: none; }

.allure-errorpath__hero .allure-errorpath__intro {
	max-width: 38rem;
	margin-top: var(--allure-ds-space-5);
	font-size: var(--allure-ds-font-size-lead);
	line-height: var(--allure-ds-line-height-body);
}

.allure-errorpath__search {
	display: flex;
	max-width: 40rem;
	margin: var(--allure-ds-space-8) 0 0;
}

.allure-errorpath__search-input[type="search"] {
	flex: 1;
	width: 100%;
	min-width: 0;
	min-height: 3.25rem;
	margin: 0;
	padding: .75rem .9rem;
	border: 1px solid var(--allure-ds-color-line);
	border-right: 0;
	border-radius: 0;
	background: var(--allure-ds-color-surface);
	color: var(--allure-ds-color-ink);
	font: 400 1rem/1.4 var(--allure-ds-font-body);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.allure-errorpath__search-input::placeholder { color: var(--allure-ds-color-text-muted); opacity: 1; }
.allure-errorpath__search-input:focus-visible { outline: 3px solid var(--allure-ds-color-focus); outline-offset: 0; }

/* The same field rendered by Advanced Woo Search (live suggestions). Only its
   frame is restyled here; the suggestion list keeps AWS' own look. */
.allure-errorpath__search--provider { display: block; }
.allure-errorpath__search--provider .aws-container { width: 100%; }

.allure-errorpath__search--provider .aws-container .aws-search-form {
	height: 3.25rem;
	background: transparent;
}

.allure-errorpath__search--provider .aws-container .aws-search-field {
	height: 3.25rem;
	padding: .75rem 2.5rem .75rem .9rem;
	border: 1px solid var(--allure-ds-color-line);
	border-right: 0;
	border-radius: 0;
	background: var(--allure-ds-color-surface);
	color: var(--allure-ds-color-ink);
	font: 400 1rem/1.4 var(--allure-ds-font-body);
}

.allure-errorpath__search--provider .aws-container .aws-search-field::placeholder { color: var(--allure-ds-color-text-muted); opacity: 1; }
.allure-errorpath__search--provider .aws-container .aws-search-field:focus-visible { outline: 3px solid var(--allure-ds-color-focus); outline-offset: 0; }

.allure-errorpath__search--provider .aws-container .aws-search-form .aws-form-btn {
	min-width: 3.5rem;
	border: 1px solid var(--allure-ds-color-ink);
	border-radius: 0;
	/* style.css forces the shop's light AWS button with !important; the K1 field uses the dark button. */
	background: var(--allure-ds-color-ink) !important;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease;
}

.allure-errorpath__search--provider .aws-container .aws-search-form .aws-form-btn:hover {
	border-color: var(--allure-ds-button-hover);
	background: var(--allure-ds-button-hover) !important;
}

.allure-errorpath__search--provider .aws-container .aws-search-btn_icon { color: var(--allure-ds-color-text-inverse); }
.allure-errorpath__search--provider .aws-container .aws-search-btn_icon svg { fill: currentColor; }

/* Buttons (K7). */
.allure-errorpath__button,
.allure-errorpath__search-button,
.allure-errorpath__handoff .allure-homepage__button,
.allure-errorpath__handoff .allure-errorpath__about {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	min-height: var(--allure-ds-button-min-height);
	margin: 0;
	padding: var(--allure-ds-button-padding-block) var(--allure-ds-button-padding-inline);
	border: var(--allure-ds-border-width) solid var(--allure-ds-button-border);
	border-radius: var(--allure-ds-radius-control);
	background: var(--allure-ds-button-primary-background);
	color: var(--allure-ds-button-primary-text);
	font: 700 .78rem/1.3 var(--allure-ds-font-body);
	letter-spacing: .1em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.allure-errorpath__button:hover,
.allure-errorpath__search-button:hover {
	border-color: var(--allure-ds-button-hover);
	background: var(--allure-ds-button-hover);
	color: var(--allure-ds-color-text-inverse);
}

.allure-errorpath__button--secondary {
	background: var(--allure-ds-button-secondary-background);
	color: var(--allure-ds-button-secondary-text);
}

.allure-errorpath__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--allure-ds-cluster-gap);
	align-items: center;
	margin-top: var(--allure-ds-space-6);
}

.allure-errorpath__actions--center { justify-content: center; }

.allure-errorpath__textlink {
	color: var(--allure-ds-cta-text-color);
	font-weight: 600;
	text-decoration: var(--allure-ds-cta-text-decoration);
	text-underline-offset: .3em;
}

.allure-errorpath__arrow {
	flex: none;
	width: .55rem;
	height: .55rem;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
}

/* 404 "Måske leder du efter" (K5 pattern). */
.allure-errorpath__section { padding-block: var(--allure-ds-section-compact); }

.allure-errorpath__cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--allure-ds-grid-gap-compact);
	margin: var(--allure-ds-space-4) 0 0;
	padding: 0;
	list-style: none;
}

.allure-errorpath__cards li { margin: 0; }

.allure-errorpath__card {
	display: flex;
	flex-direction: column;
	gap: var(--allure-ds-space-3);
	height: 100%;
	padding: var(--allure-ds-inset-standard);
	border: var(--allure-ds-border-width) solid var(--allure-ds-color-line);
	background: var(--allure-ds-color-surface);
	color: inherit;
	text-decoration: none;
	box-sizing: border-box;
	transition: border-color 160ms ease;
}

.allure-errorpath__card:hover { border-color: var(--allure-ds-color-ink); color: inherit; }

.allure-errorpath__card-title {
	color: var(--allure-ds-color-ink);
	font: 400 1.45rem/var(--allure-ds-line-height-heading) var(--allure-ds-font-display);
	letter-spacing: var(--allure-ds-letter-spacing-heading);
}

.allure-errorpath__card-text { color: var(--allure-ds-color-text-muted); font-size: var(--allure-ds-font-size-small); }
.allure-errorpath__card .allure-errorpath__arrow { margin-top: auto; color: var(--allure-ds-color-ink); }

/* K2 Afslutningsbånd (404). */
.allure-errorpath__handoff {
	padding: var(--allure-ds-section-compact) var(--allure-ds-gutter);
	background: var(--allure-ds-color-surface-contrast);
	color: var(--allure-ds-color-text-inverse);
	text-align: center;
}

.allure-errorpath__handoff .allure-errorpath__eyebrow { color: var(--allure-ds-color-accent-soft); }

.allure-errorpath__handoff h2 {
	color: var(--allure-ds-color-text-inverse);
	font-size: var(--allure-ds-font-size-h2);
}

.allure-errorpath__handoff p:not(.allure-errorpath__eyebrow) {
	max-width: var(--allure-ds-container-narrow);
	margin: var(--allure-ds-space-4) auto var(--allure-ds-space-8);
	opacity: .82;
}

.allure-errorpath__handoff .allure-homepage__button {
	margin: 0 calc(var(--allure-ds-cluster-gap) / 2);
	border-color: var(--allure-ds-color-surface);
	background: var(--allure-ds-color-surface);
	color: var(--allure-ds-color-ink);
}

.allure-errorpath__handoff .allure-errorpath__about {
	margin: var(--allure-ds-cluster-gap) calc(var(--allure-ds-cluster-gap) / 2) 0;
	border-color: var(--allure-ds-color-text-inverse);
	background: transparent;
	color: var(--allure-ds-color-text-inverse);
}

.allure-errorpath__handoff .allure-homepage__button:hover,
.allure-errorpath__handoff .allure-errorpath__about:hover {
	border-color: var(--allure-ds-color-accent-soft);
	background: var(--allure-ds-color-accent-soft);
	color: var(--allure-ds-color-ink);
}

/* Search: the header sits directly under the site header, one search field only
   (the AWS widget in the shop's filter area is the shop's own search). */
main.woo-container:has(> .allure-errorpath--search) { padding-top: 0; }
.allure-errorpath--search .allure-commerce-archive__filters .widget_aws_widget { display: none; }
.allure-errorpath--search .allure-commerce-archive__discovery { margin-top: var(--allure-ds-space-8); }
/* D12: the shop's BeRocket filters stay; the row hides only while it has no filter to show. */
.allure-errorpath--search .allure-commerce-archive__discovery:not(:has(.bapf_sfilter)) { display: none; }

/* Search: results bridge and empty state. */
.allure-errorpath--search .allure-commerce-archive__catalog { margin-top: var(--allure-ds-section-compact); }

.allure-errorpath__bridge {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--allure-ds-grid-gap-standard);
	align-items: center;
	margin-top: var(--allure-ds-section-compact);
	padding-block: var(--allure-ds-section-compact);
	background: var(--allure-ds-color-surface-warm);
	border-image: conic-gradient(var(--allure-ds-color-surface-warm) 0 0) fill 0 / / 0 100vmax;
}

.allure-errorpath__bridge h2,
.allure-errorpath__empty h2,
.allure-errorpath__popular h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.allure-errorpath__bridge-text p:not(.allure-errorpath__eyebrow) { margin-top: var(--allure-ds-space-3); }
.allure-errorpath__bridge .allure-errorpath__actions { margin-top: 0; }

.allure-errorpath__empty {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--allure-ds-grid-gap-standard);
	margin-block: var(--allure-ds-section-compact);
}

.allure-errorpath__panel {
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border: 1px solid var(--allure-ds-color-line);
	background: var(--allure-ds-color-surface-warm);
}

.allure-errorpath__panel h2 { margin-bottom: var(--allure-ds-space-4); }

.allure-errorpath__instead h2 { font-size: 1.6rem; }

.allure-errorpath__list {
	margin: var(--allure-ds-space-4) 0 var(--allure-ds-space-4);
	padding: 0;
	list-style: none;
}

.allure-errorpath__list li { margin: 0; }

.allure-errorpath__list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--allure-ds-space-4);
	min-height: 3.25rem;
	padding: var(--allure-ds-space-3) 0;
	border-bottom: 1px solid var(--allure-ds-color-line);
	color: var(--allure-ds-color-ink);
	text-decoration: none;
}

.allure-errorpath__list a:hover { color: var(--allure-ds-color-accent); }
.allure-errorpath__instead a[href^="tel:"] { color: inherit; white-space: nowrap; }

/* K13 Populære produkter: Woo's own product cards, only the section frame here. */
.allure-errorpath__popular { margin-block: var(--allure-ds-section-compact); }

.allure-errorpath__section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: end;
	gap: var(--allure-ds-space-6);
	margin-bottom: var(--allure-ds-space-8);
}

.allure-errorpath .allure-errorpath__popular > .woocommerce { display: block; width: 100%; }

/* Same card look as the shop grid (style.css, product archive), also on the cart page. */
.allure-errorpath .allure-errorpath__popular ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--allure-ds-space-10) var(--allure-ds-grid-gap-compact);
	margin: 0;
	padding: 0;
	list-style: none;
}

.allure-errorpath .allure-errorpath__popular ul.products::before,
.allure-errorpath .allure-errorpath__popular ul.products::after { display: none; }

.allure-errorpath .allure-errorpath__popular ul.products li.product {
	position: relative;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	text-align: left;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product > a:first-child {
	display: block;
	color: var(--allure-ds-color-ink);
	text-decoration: none;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product a img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	margin: 0 0 1.35rem;
	padding: clamp(1rem, 2.4vw, 2rem);
	background: var(--allure-ds-color-surface-muted);
	object-fit: contain;
	box-sizing: border-box;
}

.allure-errorpath .allure-errorpath__popular h2.woocommerce-loop-product__title {
	margin: 0 0 .5rem;
	padding: 0;
	color: var(--allure-ds-color-ink);
	font-family: var(--allure-ds-font-display);
	font-size: clamp(1.18rem, 1.8vw, 1.5rem);
	font-weight: 400;
	letter-spacing: -.02em;
	line-height: 1.15;
	text-align: left;
	text-transform: none;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product .price {
	display: block;
	margin: 0;
	color: var(--allure-ds-color-ink);
	font-size: .93rem;
	font-weight: 600;
	line-height: 1.5;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product .button {
	display: inline-flex;
	align-items: center;
	width: auto;
	min-height: 0;
	margin: .8rem 0 0;
	padding: 0 0 .28rem;
	border: 0;
	border-bottom: 1px solid var(--allure-ds-color-ink);
	border-radius: 0;
	background: transparent;
	color: var(--allure-ds-color-ink) !important;
	font-family: var(--allure-ds-font-body);
	font-size: .65rem;
	font-weight: 600;
	letter-spacing: .12em;
	line-height: 1.35;
	text-align: left;
	text-decoration: none;
	text-transform: uppercase;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product .button::after {
	margin-left: .6rem;
	content: '→';
	font-size: 1rem;
	line-height: .8;
}

.allure-errorpath .allure-errorpath__popular ul.products li.product .button:hover,
.allure-errorpath .allure-errorpath__popular ul.products li.product .button:focus-visible {
	border-bottom-color: var(--allure-ds-color-accent);
	color: var(--allure-ds-color-accent) !important;
}

/* Tom kurv (inside the Woo Cart block): our panel replaces the block's warm box. */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block.allure-errorpath {
	padding: 0;
	background: none;
	text-align: left;
}

.allure-errorpath__cart-empty {
	max-width: 46rem;
	margin: 0 auto var(--allure-ds-space-14);
	padding: clamp(2rem, 5vw, 3.5rem);
	border: 1px solid var(--allure-ds-color-line);
	background: var(--allure-ds-color-surface-warm);
	text-align: center;
	box-sizing: border-box;
}

.allure-errorpath__cart-empty h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.allure-errorpath__cart-empty > p:first-of-type {
	max-width: 30rem;
	margin: var(--allure-ds-space-4) auto 0;
}

.allure-errorpath__cart-empty .allure-errorpath__actions { margin-top: var(--allure-ds-space-8); }
.allure-errorpath__cart-empty .allure-errorpath__small { margin-top: var(--allure-ds-space-6); }

@media (max-width: 62rem) {
	.allure-errorpath__cards,
	.allure-errorpath .allure-errorpath__popular ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.allure-errorpath__bridge { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 48rem) {
	.allure-errorpath__hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
	.allure-errorpath__empty { grid-template-columns: minmax(0, 1fr); }
	.allure-errorpath__handoff h2 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
	.allure-errorpath__handoff .allure-homepage__button,
	.allure-errorpath__handoff .allure-errorpath__about { display: flex; margin: var(--allure-ds-cluster-gap) auto 0; max-width: 20rem; }
}

@media (max-width: 30rem) {
	.allure-errorpath__cards { grid-template-columns: minmax(0, 1fr); }
	.allure-errorpath__actions .allure-errorpath__button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.allure-errorpath__button,
	.allure-errorpath__card { transition: none; }
}
