/*
 * Grillrezepte24 V60.8.2 – zentrale Frontend-Oberflächen
 * Diese Datei wird nach style.css geladen und ist die verbindliche
 * Kontrastschicht für alle öffentlichen Seiten. Druckansichten bleiben unberührt.
 */
@media screen {
  :root {
    --gr24-page-bg: #080808;
    --gr24-surface: linear-gradient(180deg, rgba(31,31,31,.98), rgba(12,12,12,.98));
    --gr24-surface-soft: linear-gradient(145deg, rgba(28,28,28,.98), rgba(13,13,13,.98));
    --gr24-surface-accent: linear-gradient(145deg, rgba(255,122,24,.14), rgba(255,255,255,.035)), #111;
    --gr24-surface-line: rgba(255,255,255,.13);
    --gr24-surface-text: #f7f2ea;
    --gr24-surface-muted: #c7bfb3;
    --gr24-surface-link: #ffb070;
    --gr24-surface-shadow: 0 18px 46px rgba(0,0,0,.26);
  }

  html { color-scheme: dark; }
  html body,
  html body main {
    background-color: var(--gr24-page-bg) !important;
    color: var(--gr24-surface-text) !important;
  }

  /* Verbindliche dunkle Inhaltsflächen und Boxen */
  :where(
    .article-main,
    .article-item,
    .quick-card,
    .side-box,
    .pro-tip-box,
    .premium-promise,
    .premium-recipe-priority,
    .ranking-opportunity-panel,
    .ranking-upgrade-v606,
    .ranking-block,
    .recipe-search-panel,
    .recipe-filter-bar,
    .recipe-directory-status,
    .temperature-finder,
    .device-problem-box,
    .sauce-match-grid article,
    .salad-filter-panel,
    .salad-match-card,
    .salad-timeline article,
    .veg-filter-panel,
    .veg-method-grid article,
    .veg-table-wrap,
    .error404-link-card a,
    .error404-guide,
    .error404-guide-points a,
    .empty-state,
    .affiliate-placeholder,
    .recipe-personal-pairing-box,
    .recipe-trust-note,
    .recipe-answer-box,
    .recipe-why-box,
    .recipe-mistake-box,
    .recipe-rating-box,
    .recipe-fact-strip,
    .grillbox-local-note,
    .grillbox-stats a,
    .grillbox-favorite-card,
    .grillbox-plan-card,
    .grillbox-shopping-section,
    .grillbox-shopping-group,
    .grillbox-empty,
    .grillbox-device-note
  ) {
    background: var(--gr24-surface) !important;
    color: var(--gr24-surface-text) !important;
    border-color: var(--gr24-surface-line) !important;
    box-shadow: var(--gr24-surface-shadow) !important;
  }

  :where(
    .ranking-opportunity-panel,
    .ranking-upgrade-v606,
    .temperature-finder,
    .premium-promise,
    .pro-tip-box,
    .recipe-personal-pairing-box,
    .recipe-trust-note,
    .device-problem-box,
    .error404-guide,
    .grillbox-device-note
  ) {
    background: var(--gr24-surface-accent) !important;
  }

  /* Überschriften, Lesetext und Links innerhalb zentraler Oberflächen */
  :where(
    .article-main,
    .quick-card,
    .side-box,
    .pro-tip-box,
    .premium-promise,
    .premium-recipe-priority,
    .ranking-opportunity-panel,
    .ranking-upgrade-v606,
    .ranking-block,
    .recipe-search-panel,
    .recipe-filter-bar,
    .recipe-directory-status,
    .temperature-finder,
    .device-problem-box,
    .salad-filter-panel,
    .salad-match-card,
    .salad-timeline article,
    .veg-filter-panel,
    .veg-method-grid article,
    .veg-table-wrap,
    .error404-link-card a,
    .error404-guide,
    .error404-guide-points a,
    .recipe-personal-pairing-box,
    .recipe-trust-note,
    .grillbox-local-note,
    .grillbox-stats a,
    .grillbox-favorite-card,
    .grillbox-plan-card,
    .grillbox-shopping-section,
    .grillbox-shopping-group,
    .grillbox-empty,
    .grillbox-device-note
  ) :where(h1,h2,h3,h4,h5,h6,strong,b,summary,legend,label) {
    color: #fff !important;
  }

  :where(
    .pro-tip-box,
    .premium-promise,
    .ranking-opportunity-panel,
    .ranking-upgrade-v606,
    .ranking-block,
    .recipe-search-panel,
    .recipe-filter-bar,
    .recipe-directory-status,
    .temperature-finder,
    .device-problem-box,
    .salad-filter-panel,
    .salad-match-card,
    .salad-timeline article,
    .veg-filter-panel,
    .veg-method-grid article,
    .veg-table-wrap,
    .error404-guide,
    .recipe-personal-pairing-box,
    .recipe-trust-note,
    .grillbox-local-note,
    .grillbox-stats a,
    .grillbox-favorite-card,
    .grillbox-plan-card,
    .grillbox-shopping-section,
    .grillbox-shopping-group,
    .grillbox-empty,
    .grillbox-device-note
  ) :where(p,li,span,small,em,td) {
    color: var(--gr24-surface-muted) !important;
  }

  :where(
    .article-main,
    .side-box,
    .pro-tip-box,
    .premium-promise,
    .ranking-opportunity-panel,
    .ranking-upgrade-v606,
    .ranking-block,
    .temperature-finder,
    .device-problem-box,
    .salad-match-card,
    .salad-timeline article,
    .veg-method-grid article,
    .error404-guide,
    .recipe-personal-pairing-box,
    .recipe-trust-note,
    .grillbox-page
  ) a:not(.btn) {
    color: var(--gr24-surface-link) !important;
  }

  /* Form- und Filterelemente: dunkle, lesbare Eingabeflächen */
  :where(
    .recipe-search-panel,
    .recipe-filter-bar,
    .salad-filter-panel,
    .veg-filter-panel,
    .temperature-finder,
    .error404-search,
    .grillbox-page
  ) :where(input,select,textarea) {
    background: #0d0d0d !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.18) !important;
  }
  :where(
    .recipe-filter-bar,
    .salad-filter-panel,
    .veg-filter-panel
  ) :where(button,.filter-chip) {
    background: rgba(255,255,255,.06) !important;
    color: #f7f2ea !important;
    border-color: rgba(255,255,255,.14) !important;
    box-shadow: none !important;
  }
  :where(
    .recipe-filter-bar,
    .salad-filter-panel,
    .veg-filter-panel
  ) :where(button,.filter-chip):is(:hover,:focus-visible,.is-active,[aria-pressed="true"]) {
    background: rgba(255,122,24,.18) !important;
    color: #fff !important;
    border-color: rgba(255,122,24,.62) !important;
  }

  /* Tabellen und FAQ-Komponenten */
  :where(.data-table,.veg-table) {
    background: #101010 !important;
    color: var(--gr24-surface-text) !important;
    border-color: var(--gr24-surface-line) !important;
  }
  :where(.data-table,.veg-table) th {
    background: #1d1d1d !important;
    color: #fff !important;
    border-color: var(--gr24-surface-line) !important;
  }
  :where(.data-table,.veg-table) td {
    background: #101010 !important;
    color: var(--gr24-surface-muted) !important;
    border-color: var(--gr24-surface-line) !important;
  }
  :where(.faq-item,.faq details) {
    background: var(--gr24-surface-soft) !important;
    color: var(--gr24-surface-text) !important;
    border: 1px solid var(--gr24-surface-line) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.18) !important;
  }
  :where(.faq-item,.faq details) summary { color: #fff !important; }
  :where(.faq-item,.faq details) :where(p,li,span) { color: var(--gr24-surface-muted) !important; }

  /* Verzeichnis, Salate und Grillgemüse */
  .recipe-directory-panel-v331 .recipe-search-panel,
  .recipe-directory-panel-v331 .recipe-filter-bar,
  .recipe-directory-status-v331 {
    background: var(--gr24-surface) !important;
    color: var(--gr24-surface-text) !important;
    border-color: var(--gr24-surface-line) !important;
  }
  .salad-timeline article strong,
  .veg-method-grid article strong {
    background: rgba(255,122,24,.14) !important;
    color: #ffb070 !important;
  }

  /* Grillbox: ehemals separate helle Oberfläche, jetzt Portalstandard */
  .grillbox-page {
    background: radial-gradient(circle at 12% 0, rgba(255,122,24,.08), transparent 28%), #080808 !important;
    color: var(--gr24-surface-text) !important;
  }
  .grillbox-section-head h2,
  .grillbox-favorite-body h3,
  .grillbox-plan-head h3,
  .grillbox-shopping-group label strong,
  .grillbox-shopping-group label b {
    color: #fff !important;
  }
  .grillbox-shopping-group h3 {
    background: #1d1d1d !important;
    color: #fff !important;
  }
  .grillbox-shopping-group li,
  .grillbox-shopping-group label,
  .grillbox-shopping-group li > button {
    border-color: rgba(255,255,255,.1) !important;
  }
  .grillbox-shopping-group li > button,
  .grillbox-card-actions .btn.ghost,
  .grillbox-section-head .btn.ghost,
  .grillbox-shopping-actions .btn.ghost,
  .grillbox-shopping-footer .btn.ghost {
    background: rgba(255,255,255,.06) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.14) !important;
  }

  /* Produktbilder dürfen weiß bleiben; Textboxen nicht. */
  :where(.home-featured-grill-main img,.product-main-image img,.featured-affiliate-main-image img) {
    background: #fff !important;
  }

  /* Sicherheitsnetz gegen ungestylte Komponenten aus älteren Templates */
  .article-main > :where(section,aside,nav,div)[style*="#fff"],
  .article-main > :where(section,aside,nav,div)[style*="255,255,255"],
  .article-main :where(section,article,div)[style*="background:#fff"],
  .article-main :where(section,article,div)[style*="background: #fff"] {
    background: var(--gr24-surface-accent) !important;
    color: var(--gr24-surface-text) !important;
    border-color: var(--gr24-surface-line) !important;
  }
}

@media screen {
  .ranking-upgrade-v606 .ranking-links a {
    background: rgba(255,122,24,.14) !important;
    color: #ffb070 !important;
    border: 1px solid rgba(255,122,24,.28) !important;
  }
  .ranking-upgrade-v606 .ranking-links a:hover {
    background: #ff7a18 !important;
    color: #111 !important;
  }
  .home-assistant-tools-grid > a,
  .assistant-quicknav-grid > a {
    color: #fff !important;
  }
}
