/* ============================================================
   BABBEL & HAEGER - Darkmode
   Greift NUR, wenn der Besucher in Browser/Betriebssystem
   "Dunkel" eingestellt hat. Kein Schalter auf der Seite.
   Standard bleibt hell.
   Farben: Hintergrund #121212 / Flaechen #1b1b1b / Linien #2c2c2c
           Text #e6e6e6 / gedaempft #a6a6a6 / Gold #be9e55
   ============================================================ */
@media (prefers-color-scheme: dark) {

  :root { color-scheme: dark; }

  /* ---------- Grundflaechen & Text ---------- */
  html body { background: #000; color: #e6e6e6; }
  html body:before { background: #161616; }
  html main { background: #121212; color: #e6e6e6; }
  html h1, html h3, html h4, html h5, html h6,
  html .h1, html .h3, html .h4 { color: #f2f2f2; }
  html h2 { color: #be9e55; }
  html hr { border-top-color: rgba(255,255,255,.12); }
  html .text-muted { color: #a6a6a6 !important; }
  html section.border-top { border-top-color: #2c2c2c; }
  html section.border-bottom { border-bottom-color: #2c2c2c; }
  html a { color: #cdb06a; }
  html footer a, html footer a:hover, html .used-item-open { color: inherit; }
  html ::selection { background: #be9e55; color: #000; }

  /* ---------- Header / Navigation ---------- */
  html nav.navbar { background: #161616; box-shadow: 0 0 32px 0 rgba(0,0,0,.6); }
  html .navbar-light .navbar-nav { background: #161616; }
  html .navbar-nav .nav-item .nav-link,
  html .navbar-light .navbar-nav:not(.social-nav) .nav-item .nav-link:hover,
  html .navbar-light .navbar-nav:not(.social-nav) .nav-item .nav-link:focus { color: #f2f2f2; }
  html .navbar-light .social-nav .nav-item .nav-link { background: #2c2c2c; color: #fff; }
  html .navbar-light .social-nav .nav-item .nav-link:hover { background: #be9e55; color: #000; }
  html .navbar-light .navbar-toggler { background: #161616; }

  /* Logo: schwarzes SVG wird weiss (Innenflaechen bleiben transparent) */
  html .navbar-brand img, html .navbar-brand svg { filter: brightness(0) invert(1); }

  /* Mobiles Menue (Pushy) */
  html .pushy .menu-btn-close-outer .menu-btn-close { background: #161616; color: #f2f2f2; }
  html .pushy .pushy-content ul li.pushy-submenu a { background: #232323; color: #e6e6e6; }

  /* ---------- Hintergrund-Klassen der Inhaltselemente ---------- */
  html .bg-white        { background-color: #1b1b1b !important; color: #e6e6e6; }
  html .bg-gray-lighter { background-color: #181818 !important; color: #e6e6e6; }
  html .bg-gray-light   { background-color: #222 !important;    color: #e6e6e6; }
  html .bg-gray-dark    { background-color: #2c2c2c !important; }
  /* .bg-primary (Gold) und .bg-black bleiben wie sie sind */

  /* ---------- Kacheln, News, Karten ---------- */
  html .tile { box-shadow: none; border: 1px solid #2c2c2c; }
  html .tile-footer { border-top-color: #3a3a3a; }
  html a.news-tile,
  html a.news-tile:hover { background-color: #1b1b1b !important; box-shadow: 0 0 0 1px #2c2c2c !important; }
  html .card, html .list-group-item { background-color: #1b1b1b; border-color: #2c2c2c; color: #e6e6e6; }
  html .table td, html .table th { background-color: #1b1b1b !important; color: #e6e6e6; border-color: #2c2c2c; }
  html .jumbotron { background-color: #1b1b1b; }
  html code, html pre { background-color: #222; color: #e6e6e6; }

  /* Produktbilder & Partnerlogos: oft schwarze Technik/Logos auf
     transparentem Grund -> heller Untergrund, damit sie sichtbar bleiben */
  html .producttile [data-mh="tile-product-img"] img {
    background: #ececec; padding: 8px; border-radius: 4px;
  }

  /* Logos (Partnerlogos, Logos in Inhalten): Farben umkehren und mit dem
     dunklen Hintergrund verrechnen. Dadurch verschwindet ein weisser
     Bildhintergrund, und dunkle/graue Logos werden hell. */
  html .col-lg-auto > img.mx-lg-auto,
  html main img[src*="logo" i]:not(.slick-start-slide-logo) {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: lighten;
    background: transparent; padding: 0;
  }

  /* ---------- Buttons ---------- */
  html .btn-black { background-color: #2c2c2c; border-color: #2c2c2c; color: #fff; }
  html .btn-black:hover { background-color: #be9e55; border-color: #be9e55; color: #000; }

  /* ---------- Formulare ---------- */
  html .form-control,
  html form.default-form .form-control:not(.bootstrap-select),
  html .bootstrap-select .btn.dropdown-toggle,
  html .bootstrap-select .dropdown-menu ul.inner,
  html select, html textarea,
  html input[type="text"], html input[type="email"], html input[type="tel"],
  html input[type="search"], html input[type="date"], html input[type="number"] {
    background-color: #222; color: #f2f2f2; border-color: #3a3a3a;
  }
  html .form-control:focus,
  html form.default-form .form-control:not(.bootstrap-select):focus,
  html .bootstrap-select.show .btn.dropdown-toggle { background-color: #2a2a2a; color: #fff; border-color: #be9e55; }
  html .form-control::placeholder { color: #8a8a8a; }
  html .bootstrap-select .dropdown-menu ul.inner li { border-top-color: #3a3a3a; }
  html .bootstrap-select .dropdown-menu ul.inner li a:hover,
  html .bootstrap-select .dropdown-menu ul.inner li.selected a { background: #2c2c2c; }

  /* Produktfilter (Radio-Kreise) */
  html #productFilter input[type='radio']:checked + label::before,
  html #productFilter input[type='radio']:not(:checked) + label::before { background: #222; border-color: #666; }
  html #productFilter input[type='radio']:hover + label::before { background: #333; box-shadow: inset 0 0 0 2px #222; }
  html #productFilter input[type='radio']:checked + label::before { background: #be9e55; }

  /* ---------- Slider / Lightbox / Cookie-Platzhalter ---------- */
  html .slick-full .slick-prev, html .slick-full .slick-next { background: #1b1b1b; }
  html .slick-dots li button:before,
  html .slick-dots li.slick-active button:before { color: #e6e6e6; }
  html .slick-start .dots-wrap .progress { background: #333; }
  html .fancybox-slide--inline > * .fancybox-slide--inline--content { background: #1b1b1b; }
  html .embed-responsive .cookieconsent-optout-marketing { background-color: #222; color: #e6e6e6; }

  /* ---------- Used & PreOwned ---------- */
  html .used-card { background: #1b1b1b; border-color: #2c2c2c; color: #e6e6e6; }
  html .used-item-image,
  html .used-modal-gallery { background: #232323; }
  html .used-filter-count, html .used-item-meta, html .used-item-condition,
  html .used-item-price .price-gross, html .used-item-info,
  html .used-vat-note, html .used-formdialog-article { color: #a6a6a6; }
  html .used-item-trust li { color: #c8c8c8; }
  html .used-item-badge { background: #333; color: #fff; }
  html .used-item-badge--fresh { background: #be9e55; color: #000; }
  html .used-item-badge--set { background: #1b1b1b; color: #f2f2f2; border-color: #f2f2f2; }
  html .used-action { background: #1b1b1b; color: #f2f2f2; border-color: #555; }
  html .used-action:hover { background: #be9e55; color: #000; border-color: #be9e55; }
  html .used-item-oldprice, html .used-item-saving { color: #ff7a7a; }
  html .used-item-checked { color: #6fd08a; }
  html .used-modal, html .used-formdialog { background: #161616; color: #e6e6e6; }
  html .used-modal::backdrop { background: rgba(0,0,0,.8); }
  html .used-modal-thumbs button { border-color: #3a3a3a; }
  html .used-formdialog .form-element-statictext,
  html .used-formdialog [id$="-hinweis"] { background: #2a2416; color: #e6e6e6; }
  html .used-legend, html .used-filter { color: #e6e6e6; }
}
