/* ============================================================
   SD-Link — Anleitungen & Downloads
   Redesign der Download-Seite (Page 540) im Markenlook.
   Lädt nach shop.css + lang.css. Nur Design-System-Tokens.
   ============================================================ */

.dl-page { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Filter blendet Karten/Download-Zeilen/Leerzustand per [hidden] aus (JS setzt
   element.hidden). Author-display-Regeln (z.B. .dl-card{display:flex}) würden
   die UA-Default-Regel [hidden]{display:none} sonst überstimmen → erzwingen. */
.dl-page [hidden] { display: none !important; }

/* Header-Sprachmenü: 13 Sprachen → scrollbar begrenzen */
.sd-header .sd-lang-menu { max-height: 64vh; overflow-y: auto; }

/* ---------- Breadcrumb spacing ---------- */
.dl-breadcrumb { padding: 18px 0 0; }

/* ---------- Intro / schlanker Hero ---------- */
.dl-hero { padding: 22px 0 14px; max-width: 760px; }
.dl-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sd-amber-600); margin: 0 0 12px;
}
.dl-hero .eyebrow svg { width: 15px; height: 15px; }
.dl-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.018em;
  color: var(--fg-brand); margin: 0 0 14px; text-wrap: balance;
}
.dl-hero p {
  font-size: 18px; line-height: 1.6; color: var(--fg-2); margin: 0; max-width: 64ch; text-wrap: pretty;
}
.dl-hero p strong { color: var(--fg-1); font-weight: 600; }

/* Kompatible-Apps Hinweiszeile */
.dl-apps {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  margin: 18px 0 4px; font-size: 14px; color: var(--fg-3);
}
.dl-apps .lbl { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--fg-2); }
.dl-apps .lbl svg { width: 15px; height: 15px; color: var(--sd-sky-600); }
.dl-apps .app {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--sd-navy-700);
  background: var(--sd-navy-050); border: 1px solid var(--sd-line-soft);
  padding: 3px 9px; border-radius: 999px;
}
.dl-apps .app.soon { color: var(--fg-muted); }

/* ---------- Filterpanel ---------- */
.dl-filters {
  position: sticky; top: 84px; z-index: 30;
  background: var(--bg-surface);
  border: 1px solid var(--sd-line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 18px 20px 16px;
  margin: 22px 0 10px;
  display: grid; gap: 16px;
}
.dl-fgroup { display: grid; gap: 10px; }
.dl-fgroup-head {
  display: flex; align-items: center; gap: 9px;
}
.dl-fgroup-step {
  width: 22px; height: 22px; flex: none; border-radius: 999px;
  background: var(--sd-navy-700); color: #fff;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.dl-fgroup-label {
  font-family: var(--font-body); font-weight: 700; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
}
.dl-fgroup-hint { font-size: 12.5px; color: var(--fg-muted); margin-left: auto; }

/* Sprach-Pills */
.dl-langs { display: flex; flex-wrap: wrap; gap: 7px; }
.dl-lang {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--sd-line);
  background: var(--bg-surface); color: var(--fg-1);
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out), color var(--dur-fast);
}
.dl-lang .sd-flag { width: 19px; height: 14px; }
.dl-lang:hover { border-color: var(--sd-navy-300); background: var(--sd-navy-050); }
.dl-lang:focus-visible { outline: 0; box-shadow: var(--shadow-focus); border-color: var(--sd-navy-500); }
.dl-lang[aria-pressed="true"] {
  background: var(--sd-navy-700); border-color: var(--sd-navy-700); color: #fff;
  box-shadow: var(--shadow-1);
}
.dl-lang[aria-pressed="true"] .sd-flag { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

/* Chip-Reihen (Hersteller / Nav-App) */
.dl-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dl-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--sd-line);
  background: var(--bg-surface); color: var(--fg-1);
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast);
  white-space: nowrap;
}
.dl-chip:hover { border-color: var(--sd-navy-300); background: var(--sd-navy-050); }
.dl-chip:focus-visible { outline: 0; box-shadow: var(--shadow-focus); border-color: var(--sd-navy-500); }
.dl-chip .ct { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted); }
.dl-chip[aria-pressed="true"] { background: var(--sd-navy-700); border-color: var(--sd-navy-700); color: #fff; }
.dl-chip[aria-pressed="true"] .ct { color: rgba(255,255,255,.7); }

/* Suchfeld */
.dl-fgroup--search { grid-template-columns: 1fr; }
.dl-search { position: relative; max-width: 360px; }
.dl-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--fg-3); pointer-events: none;
}
.dl-search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--fg-1);
  border: 1px solid var(--sd-line); border-radius: var(--r-md); background: var(--bg-surface);
  outline: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.dl-search input::placeholder { color: var(--fg-muted); }
.dl-search input:focus { border-color: var(--sd-navy-500); box-shadow: var(--shadow-focus); }

/* ---------- Ergebnis-Kopf ---------- */
.dl-resulthead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 22px 0 16px; flex-wrap: wrap;
}
.dl-resulthead .count {
  font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--fg-1);
}
.dl-resulthead .count b { color: var(--sd-navy-700); font-variant-numeric: tabular-nums; }
.dl-resulthead .count .lang-tag { color: var(--fg-3); font-weight: 600; font-size: 15px; }
.dl-reset {
  background: 0; border: 0; cursor: pointer; padding: 6px 4px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--sd-navy-600);
  display: inline-flex; align-items: center; gap: 6px;
}
.dl-reset:hover { color: var(--sd-amber-600); }
.dl-reset svg { width: 15px; height: 15px; }

/* ---------- Karten-Grid ---------- */
.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px;
  padding-bottom: 8px;
}
.dl-card {
  background: var(--bg-surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.dl-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

/* Bildkachel + Ribbon */
.dl-card-img {
  position: relative; aspect-ratio: 16/10; background: var(--sd-navy-050);
  display: flex; align-items: center; justify-content: center; padding: 20px 20px 16px;
  overflow: hidden; border-bottom: 1px solid var(--sd-line-soft);
  -webkit-mask: linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0);
}
.dl-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.dl-ribbon {
  position: absolute; top: 18px; right: -46px; width: 168px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  transform: rotate(45deg); background: var(--sd-amber-600); color: #fff;
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; box-shadow: var(--shadow-1); z-index: 2;
}
.dl-ribbon.is-angled { background: var(--sd-navy-600); }

/* Kartenkopf */
.dl-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.dl-card-mfr {
  align-self: flex-start;
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--sd-navy-050); border: 1px solid var(--sd-line-soft);
  font-size: 12px; font-weight: 600; color: var(--sd-navy-700); margin-bottom: 10px;
}
.dl-card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  color: var(--fg-brand); margin: 0 0 3px; line-height: 1.2;
}
.dl-card .sku { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); margin: 0 0 14px; }

/* Download-Liste */
.dl-downloads { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dl-dl {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px 9px 13px;
  border: 1px solid var(--sd-line); border-radius: var(--r-md);
  background: var(--bg-surface); cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none; color: inherit;
}
.dl-dl:hover { border-color: var(--sd-amber-500); background: var(--sd-amber-100); box-shadow: var(--shadow-1); }
.dl-dl:focus-visible { outline: 0; box-shadow: var(--shadow-focus); border-color: var(--sd-navy-500); }
.dl-dl .meta { flex: 1; min-width: 0; }
.dl-dl .app { font-weight: 600; font-size: 14px; color: var(--fg-1); }
.dl-dl .ver { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); margin-top: 1px; }
.dl-dl .ic {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  background: var(--sd-navy-100); color: var(--sd-navy-700);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.dl-dl .ic svg { width: 18px; height: 18px; }
.dl-dl:hover .ic { background: var(--sd-amber-600); color: #fff; }

/* ---------- Leerer Zustand ---------- */
.dl-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 56px 24px;
  background: var(--bg-surface); border: 1px dashed var(--sd-line); border-radius: var(--r-lg);
  color: var(--fg-3);
}
.dl-empty svg { width: 34px; height: 34px; color: var(--sd-navy-200); margin-bottom: 12px; }
.dl-empty h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--fg-1); margin: 0 0 6px; }
.dl-empty p { margin: 0 0 16px; font-size: 15px; }

/* ---------- Hinweis / Disclaimer ---------- */
.dl-note {
  margin: 30px 0 64px; padding: 18px 22px;
  background: var(--sd-navy-050); border-left: 4px solid var(--sd-navy-700);
  border-radius: 10px; color: var(--fg-2); font-size: 14.5px; line-height: 1.65;
}
.dl-note .hd { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--sd-navy-700); margin-bottom: 6px; }
.dl-note .hd svg { width: 16px; height: 16px; }
.dl-note a { color: var(--sd-navy-600); text-decoration: underline; text-underline-offset: 3px; }
.dl-note a:hover { color: var(--sd-amber-600); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .dl-filters { top: 0; }
}
@media (max-width: 720px) {
  .dl-page { padding: 0 18px; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-filters { position: static; }
  .dl-fgroup-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-card, .dl-dl, .dl-lang, .dl-chip { transition: none; }
  .dl-card:hover { transform: none; }
}
