Files
laraundfelix/resources/css/components/lf-premium-card.css
T
LarsandClaude Sonnet 5.5 1bc5356e84
CI Feature / test (push) Successful in 1m57s
Deploy Test / test (push) Successful in 2m0s
Deploy Test / deploy (push) Successful in 35s
Mache die Trailer-Schaltfläche zum kleinen Symbol und spiele den Trailer nach Bedienung mit Ton
Die Schaltfläche mit Text verdeckte bei kleinen Karten viel vom Video und wiederholte die Art-Marke
Film. Sie ist jetzt ein 30-px-Symbol (44 px Trefferfläche, Beschriftung nur für Hilfstechnik).
Ein Klick oder Tipp startet den Trailer mit Ton, einmal ohne Schleife; während der stummen
Vorschau beim Überfahren schaltet er den Ton zu. Das Überfahren selbst bleibt stumm, weil
Browser dafür keinen Ton erlauben.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 08:23:04 +01:00

442 lines
12 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Premium-Karten (Themen-, Medien-, Programmkarte) – übernommen aus
* docs/Brand-UI-Kit/13_premium_karten_v1.7_entwurf/components/lf-premium-card.css (Entwurf zur visuellen Freigabe).
*
* Anpassungen an das Repository:
* - Eine Karte je Platz im bestehenden Abschnittsraster. Das Beispielraster des Kits (.lf-pc-grid, .lf-pc-section,
* Spannweiten-Klassen) wird bewusst nicht übernommen; Spalten und Abstände bestimmt der Abschnitt.
* - Breitenumschaltung bei 520 px über den Platz-Container „slot“ (eine Karte füllt ihren Platz), nicht über das Fenster.
* - Gleiche Höhe je Zeile über die gemeinsame Höhe „fill“ (widgets.css), Aktion dann am unteren Rand.
* - Schriften und Farben ausschließlich über vorhandene Tokens (tokens.css); keine neuen Schriften.
* - Die Karte hat ihre eigene helle Fläche und setzt dafür die hellen Bedeutungswerte, auch in dunklen Abschnitten.
* - Kein line-clamp, keine feste Höhe: lange Titel und Texte brechen um.
*/
.lf-pc,
.lf-pc * {
box-sizing: border-box;
}
.lf-pc {
--color-heading: var(--lf-navy);
--color-text: var(--lf-ink);
--color-text-muted: var(--lf-ink-muted);
--color-border: var(--lf-line);
--color-focus: var(--lf-focus);
--pc-surface: var(--lf-white);
--pc-subtle: var(--lf-cream);
--pc-action: var(--lf-green-deep);
--pc-action-hover: #2f6407;
--pc-action-text: var(--lf-white);
--pc-accent: var(--lf-yellow);
--pc-ratio: 16 / 9;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto 1fr;
min-inline-size: 0;
inline-size: 100%;
color: var(--color-text);
background: var(--pc-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius-panel);
box-shadow: var(--shadow-raised);
font: 400 1rem/1.55 var(--font-reading);
overflow-wrap: anywhere;
}
.lf-pc--square { --pc-ratio: 1 / 1; }
.lf-pc--portrait { --pc-ratio: 3 / 4; }
.lf-pc--landscape { --pc-ratio: 16 / 9; }
.lf-pc--without-visual { grid-template-rows: 1fr; }
/* Gleiche Höhe je Zeile (Höhe „An die Zeile angleichen“): Karte füllt den gestreckten Platz. */
.widget-height-fill > .lf-pc {
flex: 1 1 auto;
}
.lf-pc__visual {
position: relative;
min-inline-size: 0;
align-self: start;
margin: 10px 10px 0;
}
.lf-pc__image {
display: block;
inline-size: 100%;
block-size: auto;
aspect-ratio: var(--pc-ratio);
/* Breite gestapelte Karten (zum Beispiel 4 Einheiten, Hochformat) würden sonst über 1000 px hoch: Das Bild wird
begrenzt, „Ganzes Bild“ bleibt vollständig (Rand), „Ausschnitt“ folgt dem Bildfokus. Text wird nie begrenzt. */
max-block-size: min(70vh, 640px);
object-fit: cover;
object-position: var(--pc-focus-x, 66%) var(--pc-focus-y, 45%);
border-radius: var(--radius-card);
background: var(--pc-subtle);
}
.lf-pc--contain .lf-pc__image {
object-fit: contain;
padding: 8px;
}
.lf-pc__badge {
position: absolute;
inset: 12px auto auto 12px;
max-inline-size: calc(100% - 24px);
padding: 5px 10px;
border-radius: var(--radius-pill);
color: var(--lf-navy);
background: var(--lf-white);
font-size: 0.75rem;
font-weight: 600;
line-height: 1.45;
}
.lf-pc__body {
display: flex;
flex-direction: column;
align-items: start;
min-inline-size: 0;
padding: clamp(20px, 4.5cqi, 32px);
gap: 12px;
}
.lf-pc__kind {
margin: 0;
color: var(--pc-action);
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.lf-pc .lf-pc__title {
margin: 0;
color: var(--color-heading);
font: 800 clamp(1.35rem, 4.6cqi, 1.75rem) / 1.18 var(--font-display);
letter-spacing: -0.025em;
text-wrap: balance;
}
.lf-pc__summary {
white-space: pre-line;
margin: 0;
color: var(--color-text-muted);
}
.lf-pc__meta {
display: flex;
flex-wrap: wrap;
gap: 6px 14px;
list-style: none;
padding: 0;
margin: 0;
color: var(--color-text-muted);
font-size: 0.875rem;
}
.lf-pc__meta li {
min-inline-size: 0;
margin: 0;
}
.lf-pc__footer {
margin-block-start: auto;
padding-block-start: 10px;
inline-size: 100%;
display: flex;
flex-direction: column;
gap: 12px;
align-items: start;
}
.lf-pc__note {
margin: 0;
color: var(--color-text-muted);
font-size: 0.8125rem;
}
.lf-pc__cta {
display: inline-flex;
align-items: center;
justify-content: center;
min-block-size: 44px;
max-inline-size: 100%;
padding: 10px 18px;
border: 1px solid transparent;
border-radius: var(--radius-pill);
background: var(--pc-action);
color: var(--pc-action-text);
font-weight: 600;
font-size: 0.9375rem;
line-height: 1.4;
text-decoration: none;
text-align: center;
white-space: normal;
transition: background-color 0.15s ease;
}
.lf-pc__cta:visited { color: var(--pc-action-text); }
.lf-pc__cta:hover { background: var(--pc-action-hover); color: var(--pc-action-text); }
.lf-pc__cta:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
/* Redaktionell: ruhige Textverlinkung mit gelber Unterstreichung. */
.lf-pc--editorial .lf-pc__cta {
padding-inline: 0;
background: transparent;
color: var(--color-heading);
border-radius: 4px;
text-align: start;
text-decoration: underline;
text-decoration-color: var(--pc-accent);
text-decoration-thickness: 3px;
text-underline-offset: 7px;
}
.lf-pc--editorial .lf-pc__cta:visited { color: var(--color-heading); }
.lf-pc--editorial .lf-pc__cta:hover { background: transparent; color: var(--color-heading); text-decoration-color: currentColor; }
/* Medien und Material: Metadatenband, grüne Aktion. */
.lf-pc--media .lf-pc__meta {
padding-block: 10px;
inline-size: 100%;
border-block: 1px solid var(--color-border);
}
/* Programm und Modul: Navy-Tafel mit Art und gelbem Akzent, auch ohne Foto vollständig; Navy-Aktion. */
.lf-pc__panel {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 20px;
min-block-size: 140px;
margin: 10px 10px 0;
padding: 24px;
border-radius: var(--radius-card);
background: var(--lf-navy);
color: var(--lf-white);
}
.lf-pc__panel-label {
font: 800 1.6rem / 1.15 var(--font-display);
}
.lf-pc__panel-accent {
display: block;
inline-size: 72px;
block-size: 10px;
color: var(--pc-accent);
}
/* Film ohne freigegebenes Bild: Filmtafel (Navy, Filmstreifen-Symbol, der Clip, falls freigegeben, liegt über dem Bildbereich). */
.lf-pc__panel-icon {
display: block;
inline-size: 44px;
block-size: 44px;
color: var(--pc-accent);
}
/* Material (Dokument, Text, Hörstück …): ruhige Cremefläche mit Materialsymbol statt Foto. */
.lf-pc__panel--material {
background: var(--pc-subtle);
color: var(--lf-navy);
border: 1px solid var(--color-border);
}
.lf-pc__panel--material .lf-pc__panel-icon { color: var(--lf-navy); }
.lf-pc--material .lf-pc__meta {
padding-block: 10px;
inline-size: 100%;
border-block: 1px solid var(--color-border);
}
/* Nur Redaktionsvorschau: Vorschaubild der Bibliothek ist markiert, weil es öffentlich nicht erscheint. */
.lf-pc__library-flag {
position: absolute;
inset: auto 12px 12px auto;
max-inline-size: calc(100% - 24px);
padding: 4px 10px;
border-radius: var(--radius-pill);
color: var(--lf-white);
background: rgb(3 37 81 / 86%);
font-size: 0.75rem;
font-weight: 600;
}
.lf-pc__editorial {
inline-size: 100%;
margin: 0;
font-size: 0.8125rem;
}
.lf-pc__editorial summary {
cursor: pointer;
font-weight: 600;
}
.lf-pc__editorial[open] summary {
margin-block-end: 0.4rem;
}
.lf-pc__private-flag {
margin: 0;
padding: 3px 10px;
border-radius: var(--radius-pill);
background: var(--color-warning-surface, var(--lf-yellow-tint));
color: var(--lf-navy);
font-size: 0.75rem;
font-weight: 600;
}
.lf-pc__editorial p,
.lf-pc__editorial ul {
margin: 0 0 0.35rem;
}
.lf-pc__editorial ul {
padding-inline-start: 1.1rem;
}
.lf-pc--catalog .lf-pc__kind { color: var(--color-heading); }
.lf-pc--catalog .lf-pc__cta { background: var(--lf-navy); color: var(--lf-white); }
.lf-pc--catalog .lf-pc__cta:visited { color: var(--lf-white); }
.lf-pc--catalog .lf-pc__cta:hover { background: var(--lf-navy-deep); color: var(--lf-white); }
/* Nur in der Redaktionsvorschau sichtbare Karte: gestrichelter Rand als Hinweis. */
.lf-pc--internal { border-style: dashed; }
/* Ab 520 px Kartenbreite (= Platzbreite) Bild oder Tafel neben dem Text, außer in der Variante „Bild immer oben“. */
@container slot (min-width: 520px) {
.lf-pc:not(.lf-pc--without-visual, .lf-pc--stacked) {
grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
grid-template-rows: 1fr;
}
.lf-pc:not(.lf-pc--stacked) .lf-pc__visual {
margin: 10px 0 10px 10px;
align-self: center;
display: flex;
}
/* Neben dem Text wie ein Bild mittig, auch wenn die Karte auf Zeilenhöhe gestreckt ist. */
.lf-pc:not(.lf-pc--stacked) .lf-pc__panel {
margin: 10px 0 10px 10px;
min-block-size: 220px;
align-self: center;
}
.lf-pc--contain:not(.lf-pc--stacked) .lf-pc__visual {
align-items: center;
background: var(--pc-subtle);
border-radius: var(--radius-card);
}
.lf-pc__body { padding: clamp(22px, 4cqi, 36px); }
.lf-pc .lf-pc__title { font-size: clamp(1.45rem, 3.4cqi, 2rem); }
}
@media (prefers-reduced-motion: reduce) {
.lf-pc__cta { transition: none; }
}
/*
* Trailer (CardClip, resources/js/card-clip.js): Der Clip liegt über dem Bildbereich und blendet erst mit dem ersten
* Bild ein; bis dahin und danach bleibt das Kartenbild stehen. Ohne JavaScript erscheint die Schaltfläche nicht.
* Bei einem Film ohne Kartenbild liegt der Clip über der Filmtafel (lf-pc__visual--panel).
*/
.lf-pc__visual--panel {
display: flex;
align-self: start;
}
.lf-pc .lf-pc__visual--panel > .lf-pc__panel {
flex: 1 1 auto;
min-inline-size: 0;
margin: 0;
}
.lf-pc__clip {
position: absolute;
inset: 0;
inline-size: 100%;
block-size: 100%;
object-fit: cover;
object-position: var(--pc-focus-x, 66%) var(--pc-focus-y, 45%);
border-radius: var(--radius-card);
background: var(--lf-navy);
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
}
.lf-pc--contain .lf-pc__clip {
object-fit: contain;
}
.is-clip-playing > .lf-pc__clip {
opacity: 1;
}
.lf-pc__clip-toggle {
position: absolute;
inset: 8px 8px auto auto;
display: none;
align-items: center;
justify-content: center;
inline-size: 30px;
block-size: 30px;
padding: 0;
border: 0;
border-radius: 50%;
color: var(--lf-white);
background: rgb(3 37 81 / 62%);
box-shadow: 0 0 0 1px rgb(255 255 255 / 40%);
cursor: pointer;
}
/* Klein im Bild, aber mit 44 px Trefferfläche für Finger und Zeiger. */
.lf-pc__clip-toggle::after {
content: '';
position: absolute;
inset: -7px;
}
.is-clip-ready > .lf-pc__clip-toggle {
display: inline-flex;
}
.lf-pc__clip-toggle:hover,
.lf-pc__clip-toggle[aria-pressed="true"] {
background: var(--lf-navy-deep, var(--lf-navy));
}
.lf-pc__clip-toggle:focus-visible {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.lf-pc__clip-icon {
inline-size: 16px;
block-size: 16px;
}
.lf-pc__clip-pause,
.lf-pc__clip-toggle[aria-pressed="true"] .lf-pc__clip-play {
display: none;
}
.lf-pc__clip-toggle[aria-pressed="true"] .lf-pc__clip-pause {
display: inline;
}
.is-clip-playing > .lf-pc__badge {
opacity: 0.85;
}
@media (prefers-reduced-motion: reduce) {
.lf-pc__clip { transition: none; }
}