/* =============================================================
   WP shims for the Broadsheet theme — everything WordPress needs
   that the verbatim static-site stylesheet (broadsheet.css) does
   not cover. Uses the same custom properties.
   ============================================================= */

/* --- Accessibility ------------------------------------------ */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  background: var(--paper);
  color: var(--ink);
  display: block;
  font-family: var(--font-meta);
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  left: 5px;
  top: 5px;
  z-index: 100000;
}

/* --- Masthead logo mark -------------------------------------- */
.site-header .logo .logo-mark {
  display: block;
  height: 2.1rem;
  width: auto;
  margin: 0 auto 0.35rem;
}

/* --- Classic/blocks image alignment -------------------------- */
.review-body img,
.entry-content img {
  max-width: 100%;
  height: auto;
}
.alignleft {
  float: left;
  margin: 0.4rem 1.4rem 0.9rem 0;
}
.alignright {
  float: right;
  margin: 0.4rem 0 0.9rem 1.4rem;
}
.aligncenter {
  display: block;
  margin: 1.2rem auto;
}
.alignnone {
  margin: 1.2rem 0;
}
.wp-caption {
  max-width: 100%;
}
.wp-caption-text,
.review-body figcaption {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.45rem;
}

/* --- Block tables inherit the broadsheet table look ----------
   .review-body table is already styled by broadsheet.css; the
   block wrapper just needs sane spacing + overflow. */
.review-body .wp-block-table {
  margin: 1.6rem 0;
  overflow-x: auto;
}
.review-body .wp-block-table table {
  margin: 0;
}

/* --- Pagination (mono meta style) ----------------------------- */
.pagination,
.navigation.pagination {
  margin: 2rem 0 3rem;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--rule-soft);
  color: var(--ink-2);
  text-decoration: none;
  background-image: none;
}
.pagination a.page-numbers:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.pagination .page-numbers.current {
  border-color: var(--rule);
  color: var(--ink);
  font-weight: 700;
}
.pagination .page-numbers.dots {
  border: 0;
}

/* --- Search form ---------------------------------------------- */
.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}
.search-form input[type="search"] {
  flex: 1 1 auto;
  font-family: var(--font-meta);
  font-size: 0.85rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.search-form input[type="submit"],
.search-form button {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

/* --- Footer 18+ note ------------------------------------------ */
.site-footer .footer-note {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0.8;
  margin-top: 0.7rem;
}

/* --- Review aside: focus chips + Datenblatt -------------------
   The aside itself is display:none under 1024px in broadsheet.css;
   these rules only matter on wide screens. */
.review-aside .aside-focus {
  margin: 0.75rem 0 0.9rem;
}
.review-aside .aside-facts {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-meta);
  font-size: 0.74rem;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}
.facts-table th,
.facts-table td {
  padding: 0.45rem 0.2rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.facts-table tr:last-child th,
.facts-table tr:last-child td {
  border-bottom: 0;
}
.facts-table th {
  text-align: left;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  padding-right: 0.8rem;
}
.facts-table td {
  text-align: right;
  font-weight: 600;
  color: var(--ink);
}
.facts-rating {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.9rem;
  font-family: var(--font-meta);
}
.facts-rating-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.facts-rating-scale {
  font-size: 0.8rem;
  color: var(--ink-3);
}
.facts-rating-label {
  margin-left: auto;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- Kartenbilder: WordPress-Fix ------------------------------------------
 * WP schreibt width/height als HTML-Attribute (gegen CLS). Damit gilt die
 * Höhe als definit, CSS `aspect-ratio` wird ignoriert — eine 800x450-Cover
 * rendert dann 384x450 statt 384x288 und reißt die ganze Zeile auseinander
 * (gemessen: 200 px Höhenunterschied in einer Reihe). `height: auto` gibt die
 * Kontrolle an aspect-ratio zurück; object-fit: cover schneidet sauber zu.
 */
.front-card-image,
.review-card-image,
.front-lead-figure img,
.related .review-card-image {
  height: auto;
}

/* Gleich lange Teaser: die generierten Leads schwanken zwischen 2 und 7
 * Zeilen, was die Bylines in einer Reihe auf verschiedene Höhen schiebt. */
.front-card-lead,
.review-card-lead {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

/* Byline immer am Kartenfuß, damit die Karten einer Reihe unten abschließen. */
.front-card-byline,
.review-card-byline {
  margin-top: auto;
}

/* =============================================================
   Navigation 0.3.0 — Provider-Chips, Filter-Tabs, Anbieter-Index
   Bewusst in der Meta-Typo des Blattes (Mono, versal, dünne Linien);
   broadsheet.css bleibt unangetastet.
   ============================================================= */

/* --- Provider-Chip-Reihe -------------------------------------- */
.provider-chips {
  margin: 0.5rem auto 0;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.provider-chips-page {
  max-width: var(--w-page);
  padding: 0.4rem var(--w-edge) 0;
}
.provider-chips-column {
  max-width: var(--w-column);
  padding: 0.4rem var(--w-edge) 0;
}
.provider-chips-label {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Klickbare Variante von .tag — gleiche Maße, nur mit Zustand. */
.tag-link {
  text-decoration: none;
  background-image: none;
  transition: color 120ms ease, border-color 120ms ease;
}
.tag-link:hover,
.tag-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
.tag-link.is-active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.tag-all {
  color: var(--ink-2);
  border-color: var(--rule);
  font-weight: 600;
}

/* --- Filter-Tabs ---------------------------------------------- */
.filter-tabs {
  max-width: var(--w-column);
  margin: 1.4rem auto 0;
  padding: 0 var(--w-edge);
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.filter-tab {
  display: inline-block;
  padding: 0.5rem 0 0.45rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  background-image: none;
  white-space: nowrap;
}
.filter-tab:hover,
.filter-tab:focus-visible {
  color: var(--accent);
}
.filter-tab.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* --- Leerzustand einer Tab-Auswahl ---------------------------- */
.filter-empty {
  margin: 2.5rem auto 3.5rem;
}
.filter-empty-note {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.filter-empty-link {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Provider in Karten- und Artikel-Meta --------------------- */
.review-card-meta .meta-provider-link,
.review-kicker .review-kicker-link {
  color: inherit;
  text-decoration: none;
  background-image: none;
  border-bottom: 1px solid var(--rule-soft);
}
.review-card-meta .meta-provider-link:hover,
.review-kicker .review-kicker-link:hover,
.review-card-meta .meta-provider-link:focus-visible,
.review-kicker .review-kicker-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- "Mehr von <Provider>" ------------------------------------ */
.related-provider .related-more {
  margin-top: 1rem;
}
.related-provider .related-more a {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Anbieter-Index (/anbieter/) ------------------------------ */
.providers-index {
  max-width: var(--w-column);
  margin: 1.75rem auto 0;
  padding: 0 var(--w-edge);
  border-top: 2px solid var(--rule);
}
.provider-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
  text-decoration: none;
  background-image: none;
  color: var(--ink);
}
.provider-row:hover .provider-row-name,
.provider-row:focus-visible .provider-row-name {
  color: var(--accent);
}
.provider-row-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.provider-row-count {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.providers-index-back {
  margin: 1.75rem auto 3.5rem;
}

/* --- Cookie-Hinweis + Footer-Rechtliches ---------------------------------- */
.sr-cookie {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(760px, calc(100% - 32px));
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--paper-card, #fbf7ea);
  border: 1px solid var(--rule, #1a1612);
  box-shadow: 0 6px 24px rgba(20, 17, 13, 0.18);
}
.sr-cookie[hidden] { display: none; }
.sr-cookie-text {
  flex: 1 1 340px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2, #3d362a);
}
.sr-cookie-text a { color: var(--accent, #9a2d1c); text-decoration: underline; }
.sr-cookie-btn {
  flex: 0 0 auto;
  font-family: var(--font-meta, inherit);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 18px;
  color: var(--paper, #f2ecda);
  background: var(--ink, #14110d);
  border: 1px solid var(--ink, #14110d);
  cursor: pointer;
}
.sr-cookie-btn:hover { background: var(--accent, #9a2d1c); border-color: var(--accent, #9a2d1c); }
.footer-legal { display: block; margin-top: 0.4rem; font-size: 0.78rem; }
.footer-legal a { color: var(--ink-3, #7d7361); text-decoration: underline; }
.footer-legal a:hover { color: var(--accent, #9a2d1c); }
@media (max-width: 600px) {
  .sr-cookie { bottom: 8px; padding: 12px 14px; }
}

/* --- Angebots-Leiste (sr_offer_bar) ------------------------------------- */
.sr-offerbar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 130%);
  z-index: 55;
  width: min(720px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fffdf7;
  border: 1px solid #d9cfbb;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(40, 30, 12, .18);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}
.sr-offerbar.is-in { transform: translate(-50%, 0); opacity: 1; }
.sr-offerbar[hidden] { display: none; }
.sr-offerbar-logo {
  flex: 0 0 auto;
  width: 116px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #f3ece0;
}

/* Pale logos need an ink tile — the default #f3ece0 cream swallowed the
   white-on-transparent marks half the brands ship (Faircrown was the visible
   symptom). Tone comes from the measured luminance in `_offer_logo_luma`;
   see sr_offer_image() in inc/offers.php. */
.sr-offerbar-logo--light {
  background: var(--ink, #14110d);
  padding: 5px 6px;
  box-sizing: border-box;
}

/* Bonusbedingungen stehen HIER, nicht auf den Angebotskarten: dort hingen
   unter jedem Bonus zwei graue Zeilen und zogen die Aufmerksamkeit von Marke
   und Angebot weg. */
.sr-offerbar-terms {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* 18+/Verantwortung in der Leiste. Eine Werbeleiste ohne diesen Hinweis ist
   in DE nicht zulässig; er sass vorher nur im Offer-Block weiter unten. */
.sr-offerbar-rg {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-meta);
  font-size: 0.64rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.sr-offerbar-text {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  font-size: .88rem;
  line-height: 1.45;
}
.sr-offerbar-text strong { display: block; }
.sr-offerbar-text span {
  display: block;
  color: #6d6353;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-offerbar-cta {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  color: #fff;
  background: #1f6f4a;
  border-radius: 999px;
  white-space: nowrap;
}
.sr-offerbar-cta:hover { background: #17583a; }
.sr-offerbar-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  line-height: 1;
  color: #8b8171;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.sr-offerbar-close:hover { background: #efe7d8; color: #3a332a; }
@media (max-width: 620px) {
  .sr-offerbar { gap: 10px; padding: 10px 12px; bottom: 8px; }
  .sr-offerbar-logo { width: 92px; height: 28px; }
  .sr-offerbar-text span { display: none; }
  /* 18+ остаётся: это обязательный элемент, а не украшение. */
  .sr-offerbar-rg { font-size: 0.58rem; letter-spacing: 0.04em; }
  .sr-offerbar-cta { padding: 9px 13px; font-size: .74rem; }
}
