/* Download-Pill — kompakte Download-Kennzeichnung (Variante 1c)
   Fläche #fbfaf7 · Akzent Kupfer #c25e26
   Angepasst: Hausschrift Calibri (--font-main) statt Karla (Corporate-Font), Tabler-Icon-Font
   statt Inline-SVG (bereits sitewide geladen). */

.btn-download-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  background: #fbfaf7;
  border: 1px solid #ded7c9;
  border-radius: 999px;
  font-family: var(--font-main, 'Calibri', Carlito, system-ui, sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #1d1a16;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn-download-pill:hover {
  background: #ffffff;
  border-color: #c25e26;
  box-shadow: 0 0 0 3px rgba(194, 94, 38, .14);
}

.btn-download-pill:focus-visible {
  outline: 2px solid #c25e26;
  outline-offset: 2px;
  border-color: #c25e26;
}

.btn-download-pill:active {
  background: #f6f1e8;
  box-shadow: none;
}

.btn-download-pill__icon {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  font-size: 16px;
  color: #c25e26;
}

.btn-download-pill__type {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: #c25e26;
  color: #fbfaf7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

/* Kleinere Ausspielung für Tabellen, Bildunterschriften, enge Spalten */
.btn-download-pill--sm { gap: 10px; padding: 7px 9px 7px 13px; font-size: 14px; }
.btn-download-pill--sm .btn-download-pill__icon { width: 14px; height: 14px; font-size: 14px; }
.btn-download-pill--sm .btn-download-pill__type { padding: 4px 8px; font-size: 10px; }

/* ── Tablet + Mobil (bis 1024px): gestapelte Variante ──────────────────
   Bei sehr langen Titeln (z.B. Hauptversammlungs-Unterlagen mit
   vorgeschriebenem Volltext) wuerde die Pille durch "border-radius: 999px"
   mehrzeilig zum Oval. Hier stattdessen eine Karte: Text ueber die volle
   Breite, darunter eine Fusszeile mit Download-Icon, Hinweis und Dateityp.
   Rein per CSS (Grid) — das Markup bleibt unveraendert (Icon, Text, Badge).
   Desktop (ab 1025px) ist bewusst NICHT betroffen.
   Hinweis: gilt auch fuer die kleine Variante (--sm); soll sie unveraendert
   bleiben, in den Selektoren unten ".btn-download-pill" durch
   ".btn-download-pill:not(.btn-download-pill--sm)" ersetzen. */
@media (max-width: 1024px) {

  .btn-download-pill {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto; /* feste Icon-Spalte = Icon-Breite (16px, --sm: 14px) */
    grid-template-areas:
      "text text text"
      "rule rule rule"
      "icon label type";
    align-items: center;
    row-gap: 12px;
    column-gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 20px;
  }
  .btn-download-pill--sm { padding: 12px; row-gap: 10px; }

  /* Text: volle Breite, links, bricht auch bei extrem langen Woertern um */
  .btn-download-pill > span:not(.btn-download-pill__type) {
    grid-area: text;
    min-width: 0;
    text-align: left;
    overflow-wrap: break-word;
  }

  /* Trennlinie zwischen Text und Fusszeile */
  .btn-download-pill::before {
    content: "";
    grid-area: rule;
    height: 1px;
    background: #ded7c9;
  }

  /* Fusszeile: Icon links, "Download" daneben, Dateityp-Badge rechts */
  .btn-download-pill__icon { grid-area: icon; }

  .btn-download-pill::after {
    content: "Download";
    grid-area: label;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c25e26;
  }

  .btn-download-pill__type { grid-area: type; justify-self: end; }

  /* Externer Link (z.B. YouTube): anderes Wort in der Fusszeile, passend zum aria-label */
  .btn-download-pill--external::after { content: "Externer Link"; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-download-pill { transition: none; }
}