
.tkv {
    --tkv-kort: #ffffff;
    --tkv-felt: #f1f5f9;
    --tkv-tekst: #0f172a;
    --tkv-tekst-2: #64748b;
    --tkv-linje: #e2e8f0;
    --tkv-accent: #6C63FF;
    --tkv-accent-tekst: #5a50f0;
    --tkv-accent-ink: #ffffff;
    --tkv-spar: #248a3d;
    --tkv-ned: #c93400;
    --tkv-r: 16px;
    --tkv-r-billede: 10px;
    --tkv-pad-x: 16px;
    container: tkv / inline-size;
    margin: 0 0 24px 0;
}
html.dark .tkv {
    --tkv-kort: #0f172a;
    --tkv-felt: #1e293b;
    --tkv-tekst: #f8fafc;
    --tkv-tekst-2: #94a3b8;
    --tkv-linje: #1e293b;
    --tkv-accent-tekst: #a5a0ff;
    --tkv-spar: #30d158;
    --tkv-ned: #ff9f0a;
}
body.ed .tkv {
    --tkv-kort: var(--ed-kort-2);
    --tkv-felt: var(--ed-felt);
    --tkv-tekst: var(--ed-tekst);
    --tkv-tekst-2: var(--ed-tekst-2);
    --tkv-linje: var(--ed-linje);
    --tkv-accent: var(--ed-accent);
    --tkv-accent-tekst: var(--ed-accent-tekst, var(--ed-accent));
    --tkv-accent-ink: var(--ed-accent-ink, #fff);
    --tkv-r: var(--ed-r-lille, 12px);
    --tkv-r-billede: min(var(--ed-r-lille, 10px), 10px);
    margin: 28px 0 0 0;
}
.tkv[hidden] { display: none; }
.tkv-titel { margin: 0 0 10px 0; font-size: 1.05rem; font-weight: 700; color: var(--tkv-tekst); letter-spacing: -0.015em; }
body.ed .tkv-titel { font-size: 1.1rem; }
.tkv-note { margin: -4px 0 10px 0; font-size: 0.85rem; color: var(--tkv-tekst-2); }


.tkv-liste { background: var(--tkv-kort); border: 1px solid var(--tkv-linje); border-radius: var(--tkv-r); overflow: hidden; }
.tkv-kort {
    position: relative;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; align-items: center;
    padding: 14px var(--tkv-pad-x);
}

.tkv-kort:focus { outline: none; }
.tkv-kort:focus-visible { outline: 2px solid var(--tkv-accent); outline-offset: -2px; }
.tkv-kort + .tkv-kort::before,
.tkv-kort + .tkv-flere::before { content: ''; position: absolute; top: 0; left: var(--tkv-pad-x); right: 0; height: 1px; background: var(--tkv-linje); }

.tkv-billede {
    --s: 56px;
    grid-column: 1; grid-row: 1;
    width: var(--s); aspect-ratio: 1 / 1; border-radius: var(--tkv-r-billede); overflow: hidden;
    background: var(--tkv-felt); display: flex; align-items: center; justify-content: center; color: var(--tkv-accent);
}
.tkv-billede img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tkv-billede--mellem { --s: 72px; }
.tkv-billede--stor { --s: 96px; }

.tkv-billede--hoej { width: calc(var(--s) * 0.75); aspect-ratio: 3 / 4; }
.tkv-billede--bred { aspect-ratio: 4 / 3; }
.tkv-billede--ikon { --s: 44px; }
.tkv-billede--ikon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.ed .tkv-billede { background-color: color-mix(in srgb, var(--ed-tekst) 7%, transparent); }

.tkv-tekst { grid-column: 2; grid-row: 1; min-width: 0; }
.tkv-over { margin: 0 0 1px 0; font-size: 0.75rem; font-weight: 600; color: var(--tkv-accent-tekst); overflow-wrap: anywhere; }
.tkv-navn { font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--tkv-tekst); overflow-wrap: anywhere; }
.tkv-alder {
    display: inline-block; margin-left: 4px; padding: 0 5px; vertical-align: 1px;
    border: 1px solid var(--tkv-linje); border-radius: 5px;
    font-size: 0.7rem; font-weight: 600; line-height: 1.45; color: var(--tkv-tekst-2); letter-spacing: 0;
}
.tkv-prislinje { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; margin: 2px 0 0 0; font-size: 0.92rem; }
.tkv-pris { font-weight: 600; color: var(--tkv-tekst); font-variant-numeric: tabular-nums; }
.tkv-foer { color: var(--tkv-tekst-2); font-size: 0.84rem; }
.tkv-spar { font-size: 0.84rem; font-weight: 600; color: var(--tkv-spar); }
.tkv-under { grid-column: 2 / 4; grid-row: 2; min-width: 0; }
.tkv-info { margin: 3px 0 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--tkv-tekst-2); }
.tkv-ned { color: var(--tkv-ned); font-weight: 600; }
.tkv-prik { font-size: 0.8rem; color: var(--tkv-tekst-2); }
.tkv-info .tkv-prik { margin: 0 4px; }

.tkv-mere-hold { white-space: nowrap; }
.tkv-prislinje .tkv-mere-hold { display: inline-flex; align-items: baseline; gap: 6px; }


.tkv-mere {
    appearance: none; display: inline-flex; align-items: center; gap: 1px;
    margin: -8px -6px; padding: 8px 6px; border: 0; background: none;
    font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--tkv-accent-tekst); cursor: pointer;
}
.tkv-mere svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.tkv-mere[aria-expanded="true"] svg { transform: rotate(180deg); }
.tkv-mere:focus-visible { outline: 2px solid var(--tkv-accent); outline-offset: -2px; border-radius: 6px; }
.tkv-detaljer { margin-top: 8px; font-size: 0.85rem; line-height: 1.45; color: var(--tkv-tekst-2); animation: tkvInd 0.18s ease-out both; }
.tkv-detaljer[hidden] { display: none; }
.tkv-beskrivelse { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.tkv-fakta { margin: 4px 0 0 0; font-size: 0.8rem; }
.tkv-beskrivelse + .tkv-fakta { margin-top: 6px; }
@keyframes tkvInd { from { opacity: 0; transform: translateY(-3px); } }

.tkv-laast { display: flex; align-items: center; gap: 5px; margin: 6px 0 0 0; font-size: 0.8rem; font-weight: 500; color: var(--tkv-tekst-2); }
.tkv-laast svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tkv-kort.er-laast .tkv-stepper,
.tkv-kort.er-laast .ed-stepper { opacity: 0.6; }


.tkv-valg { grid-column: 3; grid-row: 1; justify-self: end; }
.tkv-kort.har-varianter .tkv-billede,
.tkv-kort:has(> .tkv-under > :not([hidden])) .tkv-billede { grid-row: 1 / span 3; align-self: start; }
.tkv-varianter { grid-column: 2 / 4; grid-row: 3; display: grid; gap: 4px; margin-top: 8px; }
.tkv-variant { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.tkv-variant-navn { display: flex; flex-direction: column; min-width: 0; font-size: 0.94rem; font-weight: 500; color: var(--tkv-tekst); overflow-wrap: anywhere; }
.tkv-variant-navn small { margin-top: 1px; font-size: 0.8rem; font-weight: 400; color: var(--tkv-tekst-2); }
.tkv-udsolgt { font-size: 0.8rem; font-weight: 600; color: var(--tkv-tekst-2); }


.tkv-flere {
    position: relative; display: flex; width: 100%; align-items: center; justify-content: center; gap: 2px;
    min-height: 48px; padding: 12px var(--tkv-pad-x); border: 0; background: none;
    font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--tkv-accent-tekst); cursor: pointer;
}
.tkv-flere svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tkv-flere:focus-visible { outline: 2px solid var(--tkv-accent); outline-offset: -4px; border-radius: var(--tkv-r); }


.tkv-stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--tkv-felt); border-radius: 99px; padding: 3px; }
.tkv-knap { appearance: none; width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: var(--tkv-tekst); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tkv-knap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tkv-knap:disabled { opacity: 0.3; cursor: default; }
.tkv-knap:focus-visible { outline: 2px solid var(--tkv-accent); outline-offset: 1px; }
.tkv-stepper.har-valgt .tkv-knap[data-ret="1"]:not(:disabled) { background: var(--tkv-accent); color: var(--tkv-accent-ink); }
.tkv-tal { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tkv-tekst); font-size: 0.95rem; }


@container tkv (max-width: 440px) {
    .tkv-kort--stor { align-items: start; }
    .tkv-kort--stor .tkv-billede { grid-row: 1 / span 3; align-self: start; }
    .tkv-kort--stor .tkv-valg { grid-column: 2 / 4; grid-row: 3; margin-top: 8px; }
}
@container tkv (max-width: 340px) {
    .tkv-kort--mellem { align-items: start; }
    .tkv-kort--mellem .tkv-billede { grid-row: 1 / span 3; align-self: start; }
    .tkv-kort--mellem .tkv-valg { grid-column: 2 / 4; grid-row: 3; margin-top: 8px; }
}
@container tkv (max-width: 320px) {
    .tkv-kort { align-items: start; }
    .tkv-kort .tkv-billede { grid-row: 1 / span 3; align-self: start; }
    .tkv-valg { grid-column: 2 / 4; grid-row: 3; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .tkv-detaljer { animation: none; }
    .tkv-mere svg { transition: none; }
}


body.ed .tkv-liste { background: var(--ed-kort-2); border: 1px solid var(--ed-linje); border-radius: var(--ed-r-lille); }
@media (min-width: 640px) {
    body.ed .tkv { --tkv-pad-x: 20px; }
    body.ed .tkv-kort { padding-top: 16px; padding-bottom: 16px; }
}

.ed[data-ed-billetstil="billetto"] .tkv-liste { background: var(--ed-kort); background-clip: padding-box; border: 2px solid transparent; border-radius: var(--ed-r); }

.ed[data-ed-billetstil="apple"] .tkv { --tkv-pad-x: 16px; }
.ed[data-ed-billetstil="apple"] .tkv-liste { background: var(--ed-kort); border: 0; border-radius: 12px; }
.ed[data-ed-billetstil="apple"] .tkv-kort { padding-top: 14px; padding-bottom: 14px; }
.ed[data-ed-billetstil="apple"] .tkv-kort + .tkv-kort::before,
.ed[data-ed-billetstil="apple"] .tkv-kort + .tkv-flere::before { height: 0.5px; background: var(--ed-linje-staerk); }
