/*
 * IT3000 Søg · resultatside og live-forslag.
 * Farve, hjørner, afstand og skygge kommer fra indstillingerne som CSS-variabler på :root.
 * Skrifttypen arves fra temaet. Ikoner er CSS-masker, så editoren ikke kan fjerne dem.
 *
 * CHANGELOG
 * 0.1.0 · 10-11-2026 · Første version: 4 presets, chips, bedste bud, sidetal, forslag.
 */
.it3s {
	--it3s-ink: #1c2a31;
	--it3s-muted: #5b6a71;
	--it3s-line: #dfe5e7;
	--it3s-surface: #fff;
	--it3s-soft: #eef3f4;
	--it3s-mark: #ffe7a3;
	--it3s-tc: #5b6a71;
	--it3s-i-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
	--it3s-i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
	--it3s-i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.8-6.5-11a6.5 6.5 0 0 1 13 0c0 5.2-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.3'/%3E%3C/svg%3E");
	--it3s-i-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 12.5l-8 8-9-9V3.5h8z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.4'/%3E%3C/svg%3E");
	container: it3s / inline-size;
	color: var(--it3s-ink);
	line-height: 1.5;
	text-align: left;
}
.it3s *, .it3s-sugg * { box-sizing: border-box; }
.it3s a { color: inherit; }
.it3s mark { background: var(--it3s-mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.it3s .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.it3s-t0 { --it3s-tc: #2f7d4f; }
.it3s-t1 { --it3s-tc: #2b5fa8; }
.it3s-t2 { --it3s-tc: #a85f10; }
.it3s-t3 { --it3s-tc: #7a4fa3; }
.it3s-t4 { --it3s-tc: #a3402c; }

/* Søgefelt */
.it3s .it3s-form { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 5px; background: var(--it3s-surface); border: 1.5px solid #cdd6d9; border-radius: calc(var(--it3s-radius) + 4px); }
.it3s .it3s-form:focus-within { border-color: var(--it3s-accent); }
.it3s .it3s-input { flex: 1 1 0; width: 0; min-width: 0; margin: 0; padding: 8px 10px; border: 0; outline: 0; background: transparent; box-shadow: none; font: inherit; font-size: 18px; color: var(--it3s-ink); }
.it3s .it3s-btn { margin: 0; padding: 9px 18px; border: 0; border-radius: calc(var(--it3s-radius) - 1px); background: var(--it3s-accent); color: #fff; font: inherit; font-weight: 600; line-height: 1.4; cursor: pointer; }
.it3s .it3s-btn:focus-visible, .it3s a:focus-visible { outline: 3px solid #e39b2d; outline-offset: 2px; }

/* Antal, chips, beskeder */
.it3s .it3s-count { margin: 0 0 10px; color: var(--it3s-muted); font-size: 15px; }
.it3s .it3s-count strong { color: var(--it3s-ink); }
.it3s .it3s-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
.it3s .it3s-gapx { width: 8px; }
.it3s .it3s-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid #d3dbde; border-radius: 999px; background: var(--it3s-surface); font-size: 14px; line-height: 1.2; text-decoration: none; color: var(--it3s-ink); }
.it3s .it3s-chip span { color: var(--it3s-muted); font-variant-numeric: tabular-nums; }
.it3s .it3s-chip[class*="it3s-t"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--it3s-tc); }
.it3s .it3s-chip:hover { border-color: #aab6bb; }
.it3s .it3s-chip.it3s-on { background: var(--it3s-ink); border-color: var(--it3s-ink); color: #fff; }
.it3s .it3s-chip.it3s-on[class*="it3s-t"] { background: var(--it3s-tc); border-color: var(--it3s-tc); }
.it3s .it3s-chip.it3s-on span { color: rgba(255,255,255,.8); }
.it3s .it3s-chip.it3s-on::before { background: #fff; }
.it3s .it3s-info { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #f0dfb0; border-radius: var(--it3s-radius); background: #fff7e2; font-size: 15px; }
.it3s .it3s-info.it3s-soft { background: var(--it3s-soft); border-color: #d6e3e7; }
.it3s .it3s-info a { color: var(--it3s-accent); }

/* Fælles for resultater */
.it3s .it3s-list { display: flex; flex-direction: column; gap: var(--it3s-gap); margin: 0; }
.it3s .it3s-r { position: relative; min-width: 0; margin: 0; padding: 0; }
.it3s .it3s-body { min-width: 0; }
.it3s .it3s-title { margin: 0; padding: 0; font-size: 18px; line-height: 1.3; font-weight: 650; text-wrap: balance; }
.it3s .it3s-title a { text-decoration: none; color: var(--it3s-ink); }
.it3s .it3s-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.it3s .it3s-path { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--it3s-muted); white-space: nowrap; overflow: hidden; }
.it3s .it3s-path > * { flex: none; }
.it3s .it3s-path .it3s-pt { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.it3s .it3s-dom { color: var(--it3s-ink); }
.it3s .it3s-desc { margin: 5px 0 0; padding: 0; color: #3a4950; font-size: 15px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--it3s-lines, 2); overflow: hidden; }
.it3s .it3s-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.it3s .it3s-type { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--it3s-tc); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.5; }
.it3s .it3s-b { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid #e2e8e6; border-radius: 6px; background: #f1f4f3; font-size: 13px; color: #2c3a40; font-variant-numeric: tabular-nums; white-space: nowrap; }
.it3s .it3s-b-dato::before, .it3s .it3s-b-tid::before, .it3s .it3s-b-pris::before, .it3s .it3s-b-sted::before { content: ""; width: 13px; height: 13px; background: currentColor; opacity: .7; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.it3s .it3s-b-dato { --i: var(--it3s-i-cal); }
.it3s .it3s-b-tid { --i: var(--it3s-i-clock); }
.it3s .it3s-b-pris { --i: var(--it3s-i-tag); }
.it3s .it3s-b-sted { --i: var(--it3s-i-pin); }
.it3s .it3s-b-past { background: #eef0f1; color: #66737a; }
.it3s .it3s-meta { margin-top: 6px; font-size: 13px; color: var(--it3s-muted); }
.it3s .it3s-img { overflow: hidden; background: #dde5e7; }
.it3s .it3s-img img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }

/* Bedste bud */
.it3s .it3s-best { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin: 0 0 calc(var(--it3s-gap) + 10px); padding: 16px 18px; background: var(--it3s-surface); border: 1px solid var(--it3s-line); border-left: 5px solid var(--it3s-accent); border-radius: var(--it3s-radius); box-shadow: var(--it3s-shadow); }
.it3s .it3s-best .it3s-lbl { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--it3s-accent); }
.it3s .it3s-best .it3s-title { font-size: 22px; }
.it3s .it3s-best .it3s-img { width: 220px; aspect-ratio: 4 / 3; border-radius: calc(var(--it3s-radius) - 3px); }
.it3s .it3s-cta { display: inline-block; margin-top: 12px; padding: 9px 15px; border-radius: calc(var(--it3s-radius) - 2px); background: var(--it3s-accent); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
@container it3s (max-width: 620px) {
	.it3s .it3s-best { grid-template-columns: minmax(0, 1fr); }
	.it3s .it3s-best .it3s-img { order: -1; width: 100%; aspect-ratio: 16 / 9; }
}

/* Preset: Google-lignende */
.it3s-p-google .it3s-list, .it3s-p-google .it3s-best, .it3s-p-google .it3s-info, .it3s-p-google .it3s-zero { max-width: 740px; }
.it3s-p-google .it3s-list { gap: calc(var(--it3s-gap) + 12px); }
.it3s-p-google .it3s-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
.it3s-p-google .it3s-r.it3s-noimg { grid-template-columns: minmax(0, 1fr); }
.it3s-p-google .it3s-r .it3s-img { order: 2; width: 112px; height: 112px; margin-top: 22px; border-radius: calc(var(--it3s-radius) - 2px); }
.it3s-p-google .it3s-title { margin-top: 3px; font-size: 20px; font-weight: 500; }
.it3s-p-google .it3s-list .it3s-title a { color: var(--it3s-accent); }
@container it3s (max-width: 520px) {
	.it3s-p-google .it3s-r .it3s-img { width: 76px; height: 76px; }
	.it3s-p-google .it3s-title { font-size: 18px; }
}

/* Preset: Kort */
.it3s-p-kort .it3s-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.it3s-p-kort .it3s-r { display: flex; flex-direction: column; background: var(--it3s-surface); border: 1px solid var(--it3s-line); border-top: 4px solid var(--it3s-tc); border-radius: var(--it3s-radius); box-shadow: var(--it3s-shadow); overflow: hidden; }
.it3s-p-kort .it3s-r .it3s-img { aspect-ratio: 16 / 9; }
.it3s-p-kort .it3s-r .it3s-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.it3s-p-kort .it3s-r .it3s-badges { order: 3; margin-top: 4px; }
.it3s-p-kort .it3s-r .it3s-desc { order: 4; }
.it3s-p-kort .it3s-r .it3s-meta { order: 5; }
@container it3s (max-width: 560px) { .it3s-p-kort .it3s-list { grid-template-columns: minmax(0, 1fr); } }

/* Preset: Kompakt liste */
.it3s-p-kompakt .it3s-list, .it3s-p-kompakt .it3s-best, .it3s-p-kompakt .it3s-info, .it3s-p-kompakt .it3s-zero { max-width: 760px; }
.it3s-p-kompakt .it3s-list { gap: 0; background: var(--it3s-surface); border: 1px solid var(--it3s-line); border-radius: var(--it3s-radius); box-shadow: var(--it3s-shadow); overflow: hidden; }
.it3s-p-kompakt .it3s-r { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--it3s-line); }
.it3s-p-kompakt .it3s-r.it3s-noimg { grid-template-columns: minmax(0, 1fr); }
.it3s-p-kompakt .it3s-r:last-child { border-bottom: 0; }
.it3s-p-kompakt .it3s-r:hover { background: #fafbfb; }
.it3s-p-kompakt .it3s-r .it3s-img { width: 52px; height: 52px; border-radius: calc(var(--it3s-radius) - 4px); }
.it3s-p-kompakt .it3s-list .it3s-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it3s-p-kompakt .it3s-list .it3s-title a::after { content: ""; position: absolute; inset: 0; }
.it3s-p-kompakt .it3s-sub { margin-top: 2px; font-size: 13px; color: var(--it3s-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it3s-p-kompakt .it3s-sub .it3s-type { margin-right: 4px; padding: 1px 5px; font-size: 10px; vertical-align: 1px; }

/* Preset: Magasin */
.it3s-p-magasin .it3s-r { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; padding-bottom: var(--it3s-gap); border-bottom: 1px solid var(--it3s-line); }
.it3s-p-magasin .it3s-r.it3s-noimg { grid-template-columns: minmax(0, 1fr); }
.it3s-p-magasin .it3s-r:last-child { border-bottom: 0; }
.it3s-p-magasin .it3s-r .it3s-img { aspect-ratio: 3 / 2; border-radius: calc(var(--it3s-radius) - 3px); }
.it3s-p-magasin .it3s-r.it3s-lead { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; padding: 0; background: var(--it3s-surface); border: 1px solid var(--it3s-line); border-radius: var(--it3s-radius); box-shadow: var(--it3s-shadow); overflow: hidden; }
.it3s-p-magasin .it3s-r.it3s-lead.it3s-noimg { grid-template-columns: minmax(0, 1fr); }
.it3s-p-magasin .it3s-lead .it3s-img { aspect-ratio: auto; min-height: 280px; border-radius: 0; }
.it3s-p-magasin .it3s-lead .it3s-body { align-self: center; padding: 24px 26px; }
.it3s-p-magasin .it3s-lead .it3s-title { font-size: 27px; line-height: 1.18; font-weight: 700; }
@container it3s (max-width: 640px) {
	.it3s-p-magasin .it3s-r { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
	.it3s-p-magasin .it3s-r.it3s-lead { grid-template-columns: minmax(0, 1fr); }
	.it3s-p-magasin .it3s-lead .it3s-img { min-height: 0; aspect-ratio: 16 / 9; }
	.it3s-p-magasin .it3s-lead .it3s-body { padding: 16px; }
	.it3s-p-magasin .it3s-lead .it3s-title { font-size: 22px; }
}

/* Sidetal og 0 resultater */
.it3s .it3s-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.it3s .it3s-pager a, .it3s .it3s-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--it3s-line); border-radius: calc(var(--it3s-radius) - 2px); background: var(--it3s-surface); text-decoration: none; font-variant-numeric: tabular-nums; }
.it3s .it3s-pager a:hover { border-color: #aab6bb; }
.it3s .it3s-pager .it3s-cur { background: var(--it3s-accent); border-color: var(--it3s-accent); color: #fff; font-weight: 700; }
.it3s .it3s-zero { padding: 22px 24px; background: var(--it3s-surface); border: 1px solid var(--it3s-line); border-radius: var(--it3s-radius); box-shadow: var(--it3s-shadow); }
.it3s .it3s-zero h2 { margin: 0 0 6px; font-size: 22px; }
.it3s .it3s-zero h3 { margin: 16px 0 8px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--it3s-muted); }
.it3s .it3s-zero p { margin: 0 0 10px; }
.it3s .it3s-zero a:not(.it3s-chip) { color: var(--it3s-accent); }

/* Live-forslag (lægges i body af it3s.js) */
.it3s-sugg { position: absolute; z-index: 100000; display: none; padding: 6px; background: #fff; border: 1px solid #dfe5e7; border-radius: var(--it3s-radius, 10px); box-shadow: 0 14px 34px rgba(18,38,48,.18); max-height: 420px; overflow-y: auto; color: #1c2a31; font-size: 15px; line-height: 1.4; text-align: left; }
.it3s-sugg.it3s-open { display: block; }
.it3s-sugg .it3s-s { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: #1c2a31; text-decoration: none; cursor: pointer; }
.it3s-sugg .it3s-s:hover, .it3s-sugg .it3s-s[aria-selected="true"] { background: #eef3f4; }
.it3s-sugg .it3s-s::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--it3s-tc, #5b6a71); }
.it3s-sugg .it3s-s-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it3s-sugg .it3s-s-tag { flex: none; padding: 1px 6px; border-radius: 4px; background: #e2f2e7; color: #1f6b3b; font-size: 11px; font-weight: 700; }
.it3s-sugg .it3s-s-m { flex: none; color: #5b6a71; font-size: 13px; white-space: nowrap; }
.it3s-sugg .it3s-s-all { margin-top: 4px; border-top: 1px solid #dfe5e7; border-radius: 0 0 6px 6px; color: var(--it3s-accent, #0f5c73); font-weight: 600; }
.it3s-sugg .it3s-s-all::before { display: none; }
