/* [tilbud] / [tilbud_gruppe] – kompakte tilbudskort i nyheder. Indlæses kun når shortcoden bruges. */
.nytab-tilbud,
.nytab-tilbud-note {
	--nt-head: var(--headingsColor, #252424);
	--nt-text: var(--textColor, #6F6B69);
	--nt-cta: #C94800;          /* mørkere end #FE5A00, så hvid tekst har kontrast ≥ 4.5:1 */
	--nt-cta-hover: #A83C00;
	--nt-pris: #B84200;
	--nt-pris-bg: #FFF3EC;
	--nt-line: #ECEAE8;
	font-family: Inter, system-ui, sans-serif;
}

.nytab-tilbud {
	position: relative;
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	margin: 16px 0 24px;
	padding: 14px;
	background: #fff;
	border: 1px solid var(--nt-line);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	color: var(--nt-text);
	line-height: 1.4;
	font-size: 14px;
	text-align: left;
}

/* Nulstil det .entry-content giver links, billeder og afsnit. */
.nytab-tilbud a { text-decoration: none; box-shadow: none; }
.nytab-tilbud img { margin: 0; background: transparent; }
.single-post .entry-content .nytab-tilbud img { background: transparent; }

.nytab-tilbud .nt-etiket {
	grid-column: 1 / -1;
	margin: -2px 0 -6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--nt-pris);
}

.nytab-tilbud .nt-media {
	width: 88px;
	height: 88px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FAFAFA;
	border-radius: 10px;
	overflow: hidden;
}
.nytab-tilbud .nt-img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.nytab-tilbud .nt-logo { max-width: calc(100% - 10px); max-height: 60%; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.nytab-tilbud .nt-badge {
	font-weight: 700;
	font-size: 26px;
	color: var(--nt-head);
}

.nytab-tilbud .nt-body { min-width: 0; }
.nytab-tilbud .nt-titel {
	margin: 0 0 2px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nt-head);
}
.nytab-tilbud .nt-tekst { font-size: 14px; color: var(--nt-head); font-weight: 500; }
.nytab-tilbud .nt-under { font-size: 13px; color: var(--nt-text); margin-top: 2px; }

.nytab-tilbud .nt-piller { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nytab-tilbud .nt-pille {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	background: #F1EFEE;
	color: #4A4644;
	white-space: nowrap;
}
.nytab-tilbud .nt-pille--gron { background: #E6F4EC; color: #1F7A4D; }
.nytab-tilbud .nt-pille--orange { background: #FFEADE; color: #9D3A00; }
.nytab-tilbud .nt-pille--udloebet { background: #EFEDEC; color: #4A4644; text-transform: uppercase; letter-spacing: .03em; }

.nytab-tilbud .nt-pris {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	min-width: 180px;
	align-self: stretch;
	margin: -14px -14px -14px 0;
	padding: 14px 16px;
	background: var(--nt-pris-bg);
	border-radius: 0 13px 13px 0;
	text-align: right;
}
.nytab-tilbud .nt-pris-tal { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 0 8px; }
.nytab-tilbud .nt-pris-label { width: 100%; font-size: 12px; font-weight: 600; color: #6B5A50; }
.nytab-tilbud .nt-nu { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--nt-pris); white-space: nowrap; }
.nytab-tilbud .nt-foer { font-size: 13px; color: #6B5A50; }
.nytab-tilbud .nt-efter { font-size: 12px; color: #6B5A50; }

.nytab-tilbud a.nt-cta,
.entry-content .nytab-tilbud a.nt-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 6px;
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--nt-cta);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease;
}
.nytab-tilbud a.nt-cta:hover,
.nytab-tilbud a.nt-cta:focus-visible { background: var(--nt-cta-hover); color: #fff; }
.nytab-tilbud a.nt-cta:focus-visible { outline: 2px solid var(--nt-head); outline-offset: 2px; }

.nytab-tilbud a.nt-intern,
.entry-content .nytab-tilbud a.nt-intern { color: var(--nt-pris); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Udløbet / forsvundet */
.nytab-tilbud-udloebet-wrap { margin: 16px 0 24px; }
.nytab-tilbud-udloebet-wrap > .nytab-tilbud { margin: 0 0 8px; }
.nytab-tilbud.is-udloebet,
.nytab-tilbud.is-mangler {
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	padding: 10px 14px;
	background: #F6F5F4;
	border-style: dashed;
	box-shadow: none;
	color: #5E5A58;
}
.nytab-tilbud.is-mangler { grid-template-columns: minmax(0, 1fr); }
.nytab-tilbud.is-udloebet .nt-media { width: 56px; height: 56px; background: #fff; }
.nytab-tilbud.is-udloebet .nt-media img { filter: grayscale(1); opacity: .6; }
.nytab-tilbud.is-udloebet .nt-logo { max-height: 50%; }
.nytab-tilbud.is-udloebet .nt-badge { font-size: 18px; color: #5E5A58; }
.nytab-tilbud.is-udloebet .nt-tekst { color: #5E5A58; font-weight: 400; font-size: 13px; }
.nytab-tilbud .nt-piller:first-child { margin: 0 0 4px; }
.nytab-tilbud .nt-snap { font-size: 13px; color: #5E5A58; }
.nytab-tilbud .nt-snap s { color: #5E5A58; }
.nytab-tilbud.is-link { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.nytab-tilbud.is-link .nt-etiket { margin: 0 0 4px; }

/* Grid med flere kort */
.nytab-tilbud-gruppe { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0 24px; }
.nytab-tilbud-gruppe > .nytab-tilbud,
.nytab-tilbud-gruppe > .nytab-tilbud-udloebet-wrap { margin: 0; }
@media (min-width: 900px) {
	.nytab-tilbud-gruppe.nt-kol-2,
	.nytab-tilbud-gruppe.nt-kol-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* I et grid er kortene smalle: pris + knap under teksten */
	.nytab-tilbud-gruppe.nt-kol-2 .nytab-tilbud:not(.is-udloebet):not(.is-mangler):not(.is-link),
	.nytab-tilbud-gruppe.nt-kol-3 .nytab-tilbud:not(.is-udloebet):not(.is-mangler):not(.is-link) {
		grid-template-columns: 72px minmax(0, 1fr);
	}
	.nytab-tilbud-gruppe:not(.nt-kol-1) .nytab-tilbud .nt-media { width: 72px; height: 72px; }
	.nytab-tilbud-gruppe:not(.nt-kol-1) .nytab-tilbud .nt-pris {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		min-width: 0;
		margin: 0 -14px -14px;
		border-radius: 0 0 13px 13px;
		text-align: left;
	}
	.nytab-tilbud-gruppe:not(.nt-kol-1) .nytab-tilbud .nt-pris-tal { justify-content: flex-start; }
	.nytab-tilbud-gruppe:not(.nt-kol-1) .nytab-tilbud .nt-efter { flex: 1 1 auto; }
	.nytab-tilbud-gruppe:not(.nt-kol-1) .nytab-tilbud a.nt-cta { margin-top: 0; }
}
@media (min-width: 1200px) {
	.nytab-tilbud-gruppe.nt-kol-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Mobil: billede + titel øverst, derefter pris og knap i fuld bredde */
@media (max-width: 600px) {
	.nytab-tilbud { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
	.nytab-tilbud .nt-media { width: 64px; height: 64px; }
	.nytab-tilbud .nt-titel { font-size: 16px; }
	.nytab-tilbud .nt-pris {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: auto 1fr;
		align-items: center;
		gap: 2px 12px;
		min-width: 0;
		margin: 0 -12px -12px;
		padding: 12px;
		border-radius: 0 0 13px 13px;
		text-align: left;
	}
	.nytab-tilbud .nt-pris-tal { justify-content: flex-start; }
	.nytab-tilbud .nt-efter { text-align: right; }
	.nytab-tilbud a.nt-cta,
	.entry-content .nytab-tilbud a.nt-cta { grid-column: 1 / -1; width: 100%; white-space: normal; }
}

/* Note øverst på ældre nyheder */
.nytab-tilbud-note {
	margin: 16px 0 24px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #FFF3EC;
	border: 1px solid #F4CEBD;
	color: #4A4644;
	font-size: 14px;
	line-height: 1.5;
}
.nytab-tilbud-note a { color: #9D3A00; font-weight: 600; text-decoration: underline; }
