.anchers-haek,
.anchers-haek * {
	box-sizing: border-box;
}

.anchers-haek {
	--ah-border: var(--color-border, #e3dfd6);
	--ah-surface: var(--color-surface, #fff);
	--ah-soft: var(--color-surface-soft, #f4f7f3);
	--ah-text: var(--color-text, #1f2722);
	--ah-muted: var(--color-text-muted, #626b65);
	--ah-primary: var(--color-primary, #4e7c48);
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0 0 0.875rem;
	padding: clamp(1rem, 2.2vw, 1.5rem);
	border: 1px solid var(--ah-border);
	border-radius: 0.75rem;
	background: var(--ah-surface);
	color: var(--ah-text);
}

.anchers-haek__header {
	display: grid;
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.anchers-haek__title,
.anchers-haek__rule,
.anchers-haek__muted,
.anchers-haek__limits,
.anchers-haek__help,
.anchers-haek__pricing-title {
	margin: 0;
}

.anchers-haek__title {
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	line-height: 1.2;
}

.anchers-haek__rule,
.anchers-haek__muted,
.anchers-haek__limits,
.anchers-haek__help {
	color: var(--ah-muted);
	font-size: 0.95rem;
}

.anchers-haek__modes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.625rem;
	margin-bottom: 1rem;
}

.anchers-haek__mode {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--ah-border);
	border-radius: 0.55rem;
	cursor: pointer;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 650;
}

.anchers-haek__mode:has(input:checked) {
	border-color: var(--ah-primary);
	background: var(--ah-soft);
	box-shadow: inset 0 0 0 1px var(--ah-primary);
}

.anchers-haek__mode input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.anchers-haek__workarea {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem;
	align-items: end;
}

.anchers-haek__panel {
	min-width: 0;
}

.anchers-haek__panel[hidden] {
	display: none;
}

.anchers-haek__label {
	display: block;
	margin-bottom: 0.45rem;
	font-weight: 650;
}

.anchers-haek__input-wrap {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 22rem;
	border: 1px solid var(--ah-border);
	border-radius: 0.55rem;
	background: var(--ah-surface);
	overflow: hidden;
}

.anchers-haek__input {
	width: 100%;
	min-width: 0;
	padding: 0.8rem;
	border: 0;
	background: transparent;
	font: inherit;
}

.anchers-haek__input:focus {
	outline: 2px solid var(--ah-primary);
	outline-offset: -2px;
}

.anchers-haek__input-wrap span {
	display: flex;
	align-items: center;
	padding: 0.8rem 0.9rem;
	color: var(--ah-muted);
	background: var(--ah-soft);
}

.anchers-haek__result {
	display: grid;
	gap: 0.15rem;
	min-height: 100%;
	padding: 0.95rem 1rem;
	border-radius: 0.55rem;
	background: var(--ah-soft);
}

.anchers-haek__result-label {
	color: var(--ah-muted);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.045em;
}

.anchers-haek__result strong {
	font-size: 1.25rem;
}

.anchers-haek__result [data-result-secondary] {
	color: var(--ah-muted);
	font-size: 0.92rem;
}

.anchers-haek__pricing {
	margin-top: 1.15rem;
}

.anchers-haek__pricing-title {
	margin-bottom: 0.65rem;
	font-size: 1.08rem;
}

.anchers-haek__pricing-table {
	display: grid;
	gap: 0.4rem;
}

.anchers-haek__tier {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--ah-border);
	border-radius: 0.5rem;
	font-size: 0.92rem;
}

.anchers-haek__tier strong {
	text-align: right;
}

.anchers-haek__tier.is-active {
	border-color: var(--ah-primary);
	background: var(--ah-soft);
	box-shadow: inset 0 0 0 1px var(--ah-primary);
}

.anchers-haek__normal-price {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0.1rem 0.35rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.045);
	color: var(--ah-muted);
	font-size: 0.76rem;
	font-weight: 600;
}

.anchers-haek__price-summary {
	display: grid;
	gap: 0.25rem;
	margin-top: 0.75rem;
	padding: 0.85rem 0.95rem;
	border-radius: 0.55rem;
	background: var(--ah-soft);
}

.anchers-haek__price-summary span {
	color: var(--ah-muted);
	font-size: 0.92rem;
}

.anchers-haek__limits,
.anchers-haek__help {
	margin-top: 0.75rem;
}

/* Kompakt afstand til WooCommerce antal og købsknap uden at ændre formularens bredde/layout. */
form.cart.anchers-haek-cart {
	row-gap: 0.75rem;
}

form.cart.anchers-haek-cart > .anchers-haek {
	flex: 0 0 100%;
	width: 100%;
	max-width: none;
}

form.cart.anchers-haek-cart > .quantity,
form.cart.anchers-haek-cart > .single_add_to_cart_button {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

@media (max-width: 680px) {
	.anchers-haek__workarea {
		grid-template-columns: 1fr;
	}

	.anchers-haek__input-wrap {
		max-width: none;
	}
}

@media (max-width: 520px) {
	.anchers-haek__modes {
		grid-template-columns: 1fr;
	}

	.anchers-haek__tier {
		align-items: flex-start;
	}
}


/* Ved "Jeg kender antallet" starter resultatfeltet øverst i arbejdsområdet. */
.anchers-haek__workarea.is-quantity-mode {
	align-items: start;
}

/* WooCommerce-elementerne flyttes hertil uden at ændre deres funktionalitet. */
.anchers-haek__purchase-slot {
	display: flex;
	align-items: stretch;
	gap: 0.75rem;
	width: 100%;
	margin-top: 0.75rem;
}

.anchers-haek__purchase-slot:empty {
	display: none;
}

.anchers-haek__purchase-slot > .quantity {
	flex: 0 0 auto;
	margin: 0 !important;
}

.anchers-haek__purchase-slot > .single_add_to_cart_button {
	flex: 1 1 auto;
	width: auto;
	min-width: 11rem;
	margin: 0 !important;
}

/* Når knapperne ligger inde i beregneren, skal formularen ikke reservere ekstra luft. */
form.cart.anchers-haek-cart--controls-moved {
	margin-bottom: 0;
}

@media (max-width: 440px) {
	.anchers-haek__purchase-slot {
		flex-wrap: wrap;
	}

	.anchers-haek__purchase-slot > .single_add_to_cart_button {
		flex-basis: 100%;
	}
}


/* Hero og fordele */
.anchers-haek__intro {
	margin: 0.45rem 0 0;
	max-width: 62ch;
	color: var(--ah-text);
	font-size: 0.95rem;
	line-height: 1.5;
}

.anchers-haek__benefits {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.anchers-haek__benefits li {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.38rem 0.58rem;
	border-radius: 999px;
	background: var(--ah-soft);
	color: var(--ah-text);
	font-size: 0.82rem;
	font-weight: 650;
	line-height: 1.2;
}

.anchers-haek__benefits li span {
	color: var(--ah-primary);
	font-weight: 800;
}
