/*
 * Autolight Smart Upsell — frontend-styling.
 * Bruger temaets EGNE design-tokens (fra style.css :root) 1:1, med
 * forsigtige fallback-værdier hvis en variabel af en fremtidig grund
 * skulle mangle. Der opfindes ingen nye farver.
 *
 * Placering: popup'en er en centreret, fixed overlay (ikke endnu en
 * hjørne-widget), så den ikke kan kollidere med den eksisterende
 * chatbot (Autolight Auto Assistant, bund-højre) eller CookieYes'
 * genbesøgsknap (bund-venstre). z-index er sat højt for at ligge over alt.
 */

.als-overlay {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(11, 14, 19, 0.72);
	padding: 16px;
	box-sizing: border-box;
}
.als-overlay[hidden] {
	display: none;
}
body.als-modal-open {
	overflow: hidden;
}

.als-modal {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: var(--surface, #141A22);
	border: 1px solid var(--line, #2A3341);
	border-radius: var(--radius, 10px);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
	padding: 24px 20px;
	font-family: 'Inter', sans-serif;
	color: var(--text, #EDF1F7);
}

.als-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	border: none;
	background: var(--surface-2, #1C2430);
	color: var(--text, #EDF1F7);
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.als-modal-header {
	text-align: center;
	margin-bottom: 18px;
	padding-right: 28px;
}
.als-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--brand, #E7AE35);
	color: var(--ink-on-brand, #201400);
	font-size: 20px;
	margin-bottom: 10px;
}
.als-modal-title {
	font-family: 'Space Grotesk', sans-serif;
	font-size: 18px;
	margin: 0 0 4px;
	color: var(--text, #EDF1F7);
}
.als-modal-subtitle {
	margin: 0;
	color: var(--muted, #8B96A5);
	font-size: 14px;
}

.als-modal-products {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 18px;
}

.als-product-card {
	display: flex;
	gap: 12px;
	align-items: center;
	background: var(--surface-2, #1C2430);
	border: 1px solid var(--line, #2A3341);
	border-radius: var(--radius, 10px);
	padding: 10px;
}
.als-product-image img {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
	display: block;
}
.als-product-body {
	flex: 1;
	min-width: 0;
}
.als-product-name {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: var(--text, #EDF1F7);
	text-decoration: none;
	margin-bottom: 2px;
}
.als-product-name:hover {
	color: var(--brand-light, #FFDE85);
}
.als-product-price {
	font-size: 13px;
	color: var(--brand, #E7AE35);
	margin-bottom: 6px;
}
.als-product-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.als-view-product {
	font-size: 12px;
	color: var(--muted, #8B96A5);
	text-decoration: underline;
}
.als-out-of-stock {
	font-size: 12px;
	color: var(--sale, #FF6A3D);
	font-weight: 600;
}

.als-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: 0.15s;
	min-height: 40px;
}
.als-btn-small {
	padding: 6px 12px;
	min-height: 32px;
	font-size: 12px;
}
.als-btn-primary {
	background: var(--brand, #E7AE35);
	color: var(--ink-on-brand, #201400);
}
.als-btn-primary:hover {
	background: var(--brand-light, #FFDE85);
	color: var(--ink-on-brand, #201400);
}
.als-btn-primary:disabled {
	opacity: 0.6;
	cursor: default;
}
.als-btn-outline {
	background: transparent;
	border: 1px solid var(--line, #2A3341);
	color: var(--text, #EDF1F7);
}
.als-btn-outline:hover {
	border-color: var(--brand, #E7AE35);
}

.als-modal-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.als-modal-actions .als-btn {
	flex: 1;
	min-width: 140px;
}

/* --------------------------------------------------------------
 * "3 særtilbud til dig" — kurv-siden
 * -------------------------------------------------------------- */

.als-cart-offers {
	max-width: var(--maxw, 1440px);
	margin: 32px auto 0;
	padding: 0 16px;
	font-family: 'Inter', sans-serif;
	color: var(--text, #EDF1F7);
}
.als-cart-offers-title {
	font-family: 'Space Grotesk', sans-serif;
	font-size: 20px;
	margin: 0 0 14px;
}
.als-cart-offers-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.als-offer-card {
	background: var(--surface, #141A22);
	border: 1px solid var(--line, #2A3341);
	border-radius: var(--radius, 10px);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.als-offer-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.als-offer-name {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: var(--text, #EDF1F7);
	text-decoration: none;
}
.als-offer-name:hover {
	color: var(--brand-light, #FFDE85);
}
.als-offer-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.als-offer-price-old {
	text-decoration: line-through;
	color: var(--muted, #8B96A5);
	font-size: 13px;
}
.als-offer-price-new {
	color: var(--sale, #FF6A3D);
	font-weight: 700;
	font-size: 15px;
}
.als-offer-add {
	width: 100%;
}

/* --------------------------------------------------------------
 * Mobil (375 / 390 / 430px) — store touch-mål, luk-knap altid synlig,
 * naturlig scroll, ingen kollision med chatbot/cookie-UI.
 * -------------------------------------------------------------- */
@media (max-width: 480px) {
	.als-overlay {
		padding: 0;
		align-items: flex-end;
	}
	.als-modal {
		max-width: 100%;
		width: 100%;
		max-height: 88vh;
		border-radius: var(--radius, 10px) var(--radius, 10px) 0 0;
		padding: 20px 16px 24px;
	}
	.als-modal-close {
		top: 10px;
		right: 10px;
	}
	.als-modal-actions {
		flex-direction: column;
	}
	.als-modal-actions .als-btn {
		width: 100%;
	}
	.als-cart-offers-grid {
		grid-template-columns: 1fr;
	}
	.als-offer-card {
		flex-direction: row;
		align-items: center;
	}
	.als-offer-image {
		width: 72px;
		flex: 0 0 72px;
	}
	.als-offer-body {
		flex: 1;
	}
	.als-offer-add {
		width: auto;
		min-width: 100px;
	}
}

@media (min-width: 481px) and (max-width: 860px) {
	.als-cart-offers-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
