/* Anbieterkarten v2 (KSV) - nur geladen, wenn der Schalter bk_karten_v2 greift
   (inc/components/karten-v2.php). Zwei Karten: kompakt (.bk-k2) und
   ausfuehrlich (.bk-k2-detail, Kopf = Karte der Anbieterliste aus bk-vendorlist).
   Farben wie die Anbieterliste: Gruen ist Kante und Button, Text bleibt dunkel. */

.bk-k2-huelle { container-type: inline-size; margin: 1.5em 0; }
.bk-k2-raster .bk-k2-huelle { margin: 0; }

.bk-k2 {
  border: 1px solid #dfe5e0;
  border-radius: 8px;
  background: #fff;
  color: #222;
  overflow: hidden;
}
.bk-k2--hervor { border-color: #2bb24c; box-shadow: 0 0 0 1px #2bb24c inset; }

.bk-k2-etikett {
  display: inline-block;
  margin: 14px 16px 0;
  padding: 3px 8px;
  border-radius: 3px;
  background: #eaf7ee;
  color: #10692a;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}
.bk-k2-etikett--anzeige { background: #f1f3f2; color: #5c5f59; font-weight: 500; }

.bk-k2-body {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px 16px;
}

.bk-k2-logo { display: flex; align-items: center; justify-content: center; height: 56px; text-decoration: none; }
.bk-k2-logo img { max-width: 120px; max-height: 50px; width: auto; height: auto; object-fit: contain; }
.bk-k2-logo-text { font-weight: 700; color: #222; }

.bk-k2-info { min-width: 0; }
.bk-k2-name { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; }
.bk-k2-name a { color: #1d1f1c; text-decoration: none; }
.bk-k2-name a:hover { text-decoration: underline; }

.bk-k2-zeile {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  margin-top: 4px; font-size: 14px; color: #5c5f59;
}
.bk-k2-bewertung { display: inline-flex; align-items: center; gap: 6px; color: #5c5f59; text-decoration: none; }
.bk-k2-bewertung .review-rating { display: inline-block !important; width: 88px !important; height: 17px !important; vertical-align: middle; }
.bk-k2-bewertung .review-score { display: block !important; height: 17px !important; }
.bk-k2-preis { font-size: 17px; font-weight: 700; color: #1d1f1c; font-variant-numeric: tabular-nums; }
.bk-k2-preis small { font-size: 13px; font-weight: 400; color: #5c5f59; }

.bk-k2-satz { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #333330; }
.bk-k2-merkmale { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 !important; padding: 0 !important; list-style: none !important; }
.bk-k2-merkmale li {
  margin: 0 !important; padding: 2px 8px; list-style: none !important;
  font-size: 12.5px; line-height: 1.4; color: #3b4a40;
  background: #f4f6f3; border: 1px solid #e3e8e4; border-radius: 3px;
}
.bk-k2-merkmale li::before { content: none !important; }

.bk-k2-aktion { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.bk-k2-aktion .bk-k2-btn1,
.bk-k2-aktion .bk-k2-btn2 {
  box-sizing: border-box; display: block; width: 100%; margin: 0;
  text-align: center; text-decoration: none; border-radius: 4px; line-height: 1.3;
}
.bk-k2-aktion .bk-k2-btn1 { padding: 10px 14px; font-size: 15px; font-weight: 700; }
.bk-k2-aktion .bk-k2-btn1::after { content: " \203A"; }
.bk-k2-aktion .bk-k2-btn2 {
  padding: 9px 12px; font-size: 14px; color: #2c3a31; background: #fff; border: 1px solid #cfd8d2;
}
.bk-k2-aktion .bk-k2-btn2:hover { border-color: #2bb24c; color: #10692a; }

/* Schmal (Handy, Raster): alles untereinander und mittig */
@container (max-width: 520px) {
  .bk-k2-body { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 10px; padding: 12px 14px 14px; }
  .bk-k2-zeile, .bk-k2-merkmale { justify-content: center; }
  .bk-k2-aktion { min-width: 0; width: 100%; }
  .bk-k2-etikett { display: block; margin: 12px 12px 0; text-align: center; }
}

/* Box mit Kopfzeile und Raster */
.bk-k2-box { margin: 2em 0; }
.bk-k2-box-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.bk-k2-box-kopf h3 { margin: 0; font-size: 1.15em; }
.bk-k2-box-anzeige { font-size: 11px; color: #5c5f59; }
.bk-k2-box-text { margin: 0 0 12px; font-size: 14px; color: #5c5f59; }
.bk-k2-box { container-type: inline-size; }
/* Spaltenzahl = Kartenzahl, damit keine Karte allein in einer Reihe steht;
   zu schmal dafuer: untereinander. */
.bk-k2-raster { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 440px) { .bk-k2-raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 620px) { .bk-k2-raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bk-k2-raster .bk-k2-huelle { display: flex; }
.bk-k2-raster .bk-k2 { flex: 1 1 auto; }

/* Ausfuehrliche Karte */
.bk-k2-detail { margin: 2em 0; border: 1px solid #dfe5e0; border-radius: 12px; background: #fff; overflow: hidden; }
.bk-k2-detail-name { margin: 0; padding: 16px 20px 0; font-size: 1.2em; }
.bk-k2-listenkopf.bkvl-list { margin: 0; max-width: none; display: block; }
.bk-k2-listenkopf .bkvl-card { border: 0; border-radius: 0; box-shadow: none; }
/* Ohne Buttonspalte zwei Spalten statt drei; schmal gilt die Regel der Anbieterliste (eine Spalte). */
@container bkvl (min-width: 601px) { .bk-k2-listenkopf .bkvl-card { grid-template-columns: minmax(0, 166px) minmax(0, 1fr); } }
.bk-k2-listenkopf .bkvl-card:hover { box-shadow: none; }
.bkvl-unterzeile { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: #10692a; }
.bk-k2-detail-text { padding: 4px 20px 8px; border-top: 1px solid #e6e8e3; }
.bk-k2-abschnitt { border-top: 1px solid #e6e8e3; margin: 0 -20px; }
.bk-k2-abschnitt > summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; font-weight: 700; font-size: 15px; color: #1d1f1c;
}
.bk-k2-abschnitt > summary::-webkit-details-marker { display: none; }
.bk-k2-abschnitt > summary::after { content: "+"; font-size: 20px; line-height: 1; color: #178435; }
.bk-k2-abschnitt[open] > summary::after { content: "\2013"; }
.bk-k2-abschnitt > summary:focus-visible { outline: 2px solid #2bb24c; outline-offset: -2px; }
.bk-k2-abschnitt-inhalt { padding: 0 20px 12px; }
.bk-k2-detail-aktion { padding: 14px 20px 18px; border-top: 1px solid #e6e8e3; background: #fafbfa; }
.bk-k2-detail-hinweis { margin: 0 0 10px; font-size: 14px; color: #5c5f59; }
.bk-k2-aktion--zeile { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.bk-k2-aktion--zeile .bk-k2-btn1 { flex: 0 1 256px; width: auto; }
.bk-k2-aktion--zeile .bk-k2-btn2 { flex: 0 1 184px; width: auto; }
@media (max-width: 600px) {
  .bk-k2-aktion--zeile .bk-k2-btn1, .bk-k2-aktion--zeile .bk-k2-btn2 { flex: 1 1 100%; }
  .bk-k2-detail-text, .bk-k2-detail-aktion { padding-left: 16px; padding-right: 16px; }
  .bk-k2-abschnitt { margin: 0 -16px; }
  .bk-k2-abschnitt > summary, .bk-k2-abschnitt-inhalt { padding-left: 16px; padding-right: 16px; }
}

/* Das Theme unterstreicht Links per box-shadow; in den Karten nicht. */
.bk-k2 a, .bk-k2-detail-aktion a { box-shadow: none !important; }
.bk-k2 a:not(.bk-k2-btn2), .bk-k2-detail-aktion a:not(.bk-k2-btn2) { border-bottom: 0 !important; }
.bk-k2-aktion .bk-k2-btn2 { border-bottom: 1px solid #cfd8d2 !important; }

/* wpautop setzt leere Absaetze um die Shortcodes. Der Fliesstext nach einem
   Abschnitt steht seit 24.11.2026 im Abschnitt (bk_k2_abschnitte_fuellen),
   die Abschnitte folgen also direkt aufeinander und schliessen den Text ab. */
.bk-k2-detail-text p:empty { display: none; }
.bk-k2-detail-text > .bk-k2-abschnitt:last-of-type { margin-bottom: -8px; }
.bk-k2-aktion .bk-k2-btn2:hover { border-color: #2bb24c; color: #10692a; }

/* Schmal (Handy, Raster): alles untereinander und mittig */
@container (max-width: 520px) {
  .bk-k2-body { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 10px; padding: 12px 14px 14px; }
  .bk-k2-zeile, .bk-k2-merkmale { justify-content: center; }
  .bk-k2-aktion { min-width: 0; width: 100%; }
  .bk-k2-etikett { display: block; margin: 12px 12px 0; text-align: center; }
}

/* Box mit Kopfzeile und Raster */
.bk-k2-box { margin: 2em 0; }
.bk-k2-box-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.bk-k2-box-kopf h3 { margin: 0; font-size: 1.15em; }
.bk-k2-box-anzeige { font-size: 11px; color: #5c5f59; }
.bk-k2-box-text { margin: 0 0 12px; font-size: 14px; color: #5c5f59; }
.bk-k2-box { container-type: inline-size; }
/* Spaltenzahl = Kartenzahl, damit keine Karte allein in einer Reihe steht;
   zu schmal dafuer: untereinander. */
.bk-k2-raster { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 440px) { .bk-k2-raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 620px) { .bk-k2-raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bk-k2-raster .bk-k2-huelle { display: flex; }
.bk-k2-raster .bk-k2 { flex: 1 1 auto; }

/* Ausfuehrliche Karte */
.bk-k2-detail { margin: 2em 0; border: 1px solid #dfe5e0; border-radius: 12px; background: #fff; overflow: hidden; }
.bk-k2-detail-name { margin: 0; padding: 16px 20px 0; font-size: 1.2em; }
.bk-k2-listenkopf.bkvl-list { margin: 0; max-width: none; display: block; }
.bk-k2-listenkopf .bkvl-card { border: 0; border-radius: 0; box-shadow: none; }
/* Ohne Buttonspalte zwei Spalten statt drei; schmal gilt die Regel der Anbieterliste (eine Spalte). */
@container bkvl (min-width: 601px) { .bk-k2-listenkopf .bkvl-card { grid-template-columns: minmax(0, 166px) minmax(0, 1fr); } }
.bk-k2-listenkopf .bkvl-card:hover { box-shadow: none; }
.bkvl-unterzeile { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: #10692a; }
.bk-k2-detail-text { padding: 4px 20px 8px; border-top: 1px solid #e6e8e3; }
.bk-k2-abschnitt { border-top: 1px solid #e6e8e3; margin: 0 -20px; }
.bk-k2-abschnitt > summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; font-weight: 700; font-size: 15px; color: #1d1f1c;
}
.bk-k2-abschnitt > summary::-webkit-details-marker { display: none; }
.bk-k2-abschnitt > summary::after { content: "+"; font-size: 20px; line-height: 1; color: #178435; }
.bk-k2-abschnitt[open] > summary::after { content: "\2013"; }
.bk-k2-abschnitt > summary:focus-visible { outline: 2px solid #2bb24c; outline-offset: -2px; }
.bk-k2-abschnitt-inhalt { padding: 0 20px 12px; }
.bk-k2-detail-aktion { padding: 14px 20px 18px; border-top: 1px solid #e6e8e3; background: #fafbfa; }
.bk-k2-detail-hinweis { margin: 0 0 10px; font-size: 14px; color: #5c5f59; }
.bk-k2-aktion--zeile { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.bk-k2-aktion--zeile .bk-k2-btn1 { flex: 0 1 256px; width: auto; }
.bk-k2-aktion--zeile .bk-k2-btn2 { flex: 0 1 184px; width: auto; }
@media (max-width: 600px) {
  .bk-k2-aktion--zeile .bk-k2-btn1, .bk-k2-aktion--zeile .bk-k2-btn2 { flex: 1 1 100%; }
  .bk-k2-detail-text, .bk-k2-detail-aktion { padding-left: 16px; padding-right: 16px; }
  .bk-k2-abschnitt { margin: 0 -16px; }
  .bk-k2-abschnitt > summary, .bk-k2-abschnitt-inhalt { padding-left: 16px; padding-right: 16px; }
}

/* Das Theme unterstreicht Links per box-shadow; in den Karten nicht. */
.bk-k2 a, .bk-k2-detail-aktion a { box-shadow: none !important; }
.bk-k2 a:not(.bk-k2-btn2), .bk-k2-detail-aktion a:not(.bk-k2-btn2) { border-bottom: 0 !important; }
.bk-k2-aktion .bk-k2-btn2 { border-bottom: 1px solid #cfd8d2 !important; }

/* wpautop setzt leere Absaetze um die Shortcodes; Abschnitte bekommen eine
   Unterkante, damit der folgende Fliesstext nicht wie ihr Inhalt aussieht. */
.bk-k2-detail-text p:empty { display: none; }
.bk-k2-abschnitt { border-bottom: 1px solid #e6e8e3; margin-bottom: 12px; }
.bk-k2-abschnitt + .bk-k2-abschnitt,
.bk-k2-abschnitt + p:empty + .bk-k2-abschnitt { margin-top: -13px; }
.bk-k2-detail-text > .bk-k2-abschnitt:last-child,
.bk-k2-detail-text > .bk-k2-abschnitt:nth-last-child(2):has(+ p:empty) { margin-bottom: -9px; border-bottom: 0; }
.bk-k2-aktion .bk-k2-btn2:hover { border-color: #2bb24c !important; }
