/* Namespace: Stellt sicher, dass Stile nur auf dieser Seite wirken.
   Optimiert für WordPress/Salient.
*/
#marken-guide-page {
  --background: 30 25% 95%;
  --foreground: 213 55% 11%;
  --card: 0 0% 100%;
  --primary: 213 55% 11%;
  --primary-foreground: 30 25% 97%;
  --secondary: 30 18% 91%;
  --muted: 30 15% 90%;
  --muted-foreground: 215 15% 40%;
  --accent: 86 54% 51%;
  --accent-foreground: 0 0% 100%;
  --border: 30 15% 87%;
  --radius: 0.75rem;
  
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typografie */
#marken-guide-page h1, 
#marken-guide-page h2, 
#marken-guide-page h3 { 
  font-family: 'Source Serif 4', serif; 
  font-weight: 700; 
  color: hsl(var(--primary)); 
}

#marken-guide-page .container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Flex-Layout: Mobil untereinander, ab Desktop (1200px) nebeneinander */
#marken-guide-page .flex-layout {
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
  overflow: visible !important; /* Wichtig für Sticky-Funktion */
}

@media (min-width: 1200px) {
  #marken-guide-page .flex-layout {
    flex-direction: row;
    align-items: flex-start !important;
  }
}

#marken-guide-page main { 
  flex: 1; 
  min-width: 0; 
}

/* Header / Hero Bereich */
#marken-guide-page header.hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 2.5rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#marken-guide-page .hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, hsla(175, 83%, 32%, 0.1), transparent, hsla(213, 55%, 11%, 0.05));
  pointer-events: none;
}

/* 1. LAYOUT & MOBILE LOGIK (Positionierung) */
#marken-guide-page .flex-layout {
    display: flex !important;
    flex-direction: column !important; /* Mobil: Menü oben */
    gap: 2rem;
}

#marken-guide-page .xl-block {
    order: -1 !important; /* Mobil: Ganz nach oben vor den Text */
    width: 100%;
    position: relative;
    background: #fff;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 12px 8px !important;
    margin-bottom: 2rem;
    display: block !important;
}

/* Desktop-Ansicht (ab 1200px) */
@media (min-width: 1200px) {
    #marken-guide-page .flex-layout {
        flex-direction: row !important; /* Nebeneinander */
    }

    #marken-guide-page .xl-block {
        order: 1 !important; /* Zurück in den normalen Fluss (rechts) */
        width: 16rem;
        flex-shrink: 0;
        position: sticky !important;
        top: 20px;
        margin-bottom: 0;
    }
}

/* 2. DESIGN & OPTIK (Linien, Farben, Abstände) */
#toc {
    display: flex;
    flex-direction: column;
    border-left: 3px solid #E6EBF2; /* Die graue Basis-Linie */
    margin-left: 10px;
}

#marken-guide-page .toc-link {
    display: block !important;
    padding: 4px 12px !important;
    margin: 0 0 0 -3px !important; /* Überlappt die graue Linie */
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.2;
    color: #5B6678;
    border-left: 3px solid transparent; 
    transition: all 0.2s ease;
}

/* Hover-Effekt */
#marken-guide-page .toc-link:hover {
    background-color: rgba(140, 198, 63, 0.1); /* Hellgrün #8cc63f */
    color: #0B2D45;
}

/* AKTIVER ZUSTAND (Scroll-Position) */
#marken-guide-page .toc-link.active {
    font-weight: 700 !important;
    color: #0B2D45 !important;
    border-left: 5px solid #8cc63f !important; /* Dicke Linie in #8cc63f */
    background-color: rgba(140, 198, 63, 0.15) !important; /* Hintergrund-Highlight */
    padding-left: 16px !important;
}

/* Cards & Komponenten */
#marken-guide-page section.card {
  scroll-margin-top: 120px; /* Verhindert, dass Überschriften unter dem Header landen */
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

#marken-guide-page .step-badge {
  background: hsl(var(--accent));
  color: white;
  width: 2.5rem; height: 2.5rem;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 0.5rem;
  font-weight: 700;
  margin-right: 1rem;
}

#marken-guide-page .callout {
  border: 1px solid hsla(175, 83%, 32%, 0.25);
  background-color: rgba(140, 198, 63, 0.1); 
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

#marken-guide-page .btn-tulex {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(var(--accent));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Tabellen */
#marken-guide-page .table-wrap { 
  overflow-x: auto; 
  border: 1px solid hsl(var(--border)); 
  border-radius: 0.75rem; 
  margin-top: 1.5rem; 
}

#marken-guide-page table { 
  width: 100%; 
  border-collapse: collapse; 
  font-size: 0.875rem; 
  min-width: 640px; 
}

#marken-guide-page th { 
  background: hsla(30, 18%, 91%, 0.6); 
  text-align: left; 
  padding: 1rem; 
}

#marken-guide-page td { 
  padding: 1rem; 
  border-top: 1px solid hsl(var(--border)); 
}

/* FAQ / Accordion */
#marken-guide-page .faq-item { border-bottom: 1px solid hsl(var(--border)); }

#marken-guide-page .faq-trigger { 
  width: 100%; 
  text-align: left; 
  padding: 1.25rem 0; 
  background: none; 
  border: none; 
  font-weight: 500; 
  cursor: pointer; 
  display: flex; 
  justify-content: space-between; 
  font-size: 1rem; 
}

#marken-guide-page .faq-content { 
  display: none; 
  padding-bottom: 1.25rem; 
  color: hsla(213, 55%, 11%, 0.8); 
}

#marken-guide-page .faq-item.active .faq-content { display: block; }

/* Kontakt Bereich */
#marken-guide-page .contact-cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 1.5rem; 
}

#marken-guide-page .contact-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
}

#marken-guide-page .button-primary { background: hsl(var(--accent)); color: white; border: none; padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; }
#marken-guide-page .button-outline { background: transparent; border: 1px solid hsl(var(--accent)); color: hsl(var(--accent)); padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none; display: inline-block; }


#header-outer {
    background: #ffffff;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: 'Inter', sans-serif;
    position: sticky;
    top: 0;
}

#header-outer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

#header-outer .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo img {
    height: 55px;
    width: auto;
    display: block;
}

/* NAVIGATION */
nav .sf-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .sf-menu > li {
    position: relative;
    padding: 15px 5px;
}

nav .sf-menu a {
    text-decoration: none;
    color: #0B2D45;
    font-weight: 600;
    font-size: 12px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

nav .sf-menu a:hover { color: #8cc63f; }

/* --- DROP-DOWN DESIGN ANPASSUNG --- */

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 260px; /* Etwas breiter für die Linie */
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    list-style: none;
    /* Wir entfernen die alte Border oben und nutzen die seitliche Linie */
    border-top: none; 
}

.sub-menu li {
    position: relative;
    padding: 0;
}

.sub-menu a {
    display: block !important;
    /* Erhöhtes Padding: 12px statt vorher 8px (+4px Differenz) */
    padding: 12px 20px 12px 15px !important; 
    font-weight: 500 !important;
    font-size: 13px !important;
    color: #5B6678 !important; /* Muted Foreground aus dem Guide */
    text-decoration: none;
    border-left: 4px solid transparent; /* Vorbereitung für die Linie */
    transition: all 0.2s ease-in-out;
}

/* HOVER EFFECT (Wie im Inhaltsverzeichnis) */
.sub-menu a:hover {
    /* Dein Wunschton #8cc63f mit 15% Deckkraft */
    background-color: rgba(140, 198, 63, 0.15) !important; 
    color: #0B2D45 !important;
    /* Die markante grüne Linie an der Seite */
    border-left: 5px solid #8cc63f !important;
    padding-left: 20px !important; /* Kleiner Einrück-Effekt */
}

/* Second Level Dropdown (Seitwärts) */
.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    border-radius: 0 8px 8px 8px;
}
/* Sicherstellen, dass der Header immer ganz oben liegt */
#header-outer {
    position: sticky !important;
    top: 0;
    z-index: 10000 !important; /* Höher als die Sidebar */
    background: #ffffff;
}

/* Dropdown Sichtbarkeit erzwingen */
nav .sf-menu li:hover > .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix für verschachtelte Menüs (Kurzgutachten etc.) */
.sub-menu li:hover > .sub-menu {
    display: block !important;
    left: 100% !important;
    top: 0 !important;
}

/* FOOTER GESAMT-STYLING */
#footer-outer {
    background-color: #ffffff;
    border-top: 1px solid #E6EBF2;
    padding: 60px 0 0 0;
    font-family: 'Inter', sans-serif;
    color: #5B6678;
}

#footer-widgets .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#footer-widgets .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

/* WIDGET TITEL & TEXT */
#footer-widgets .widget {
    margin-bottom: 30px;
}

#footer-widgets .textwidget {
    font-size: 14px;
    line-height: 1.8;
}

#footer-widgets b {
    display: block;
    color: #0B2D45;
    margin-bottom: 10px;
    font-size: 16px;
}

/* FOOTER MENÜS */
#footer-widgets ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer-widgets ul li {
    margin-bottom: 10px;
}

#footer-widgets ul li a {
    text-decoration: none;
    color: #5B6678;
    font-size: 14px;
    transition: color 0.2s ease;
}

#footer-widgets ul li a:hover {
    color: #8cc63f; /* Dein Tulex-Grün */
}

/* COPYRIGHT BEREICH */
#copyright {
    background: #f9fafb;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid #E6EBF2;
}

#copyright .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
}

@media (max-width: 768px) {
    #copyright .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}


/* ============================================================
   TULEX.DE MARKENCHECK - FINAL DESIGN (MIT STATUS & AMT FIX)
   ============================================================ */

/* 1. WORDPRESS OVERRIDE & RESET */
.wp-block-group-is-layout-constrained > #tm-widget,
.is-layout-constrained > #tm-widget,
.wp-block-post-content-is-layout-constrained > #tm-widget,
.wp-site-blocks > #tm-widget {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
}
body #tm-widget * { box-sizing: border-box; }

/* 2. HAUPT-CONTAINER */
#tm-widget .widget-container { 
    max-width: 1400px; 
    margin: 0 auto; 
    background: #ffffff; /* Tulex Weiß */
    padding: 20px; 
    border-radius: 4px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    position: relative; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    color: #333;
    border: 1px solid #eee;
}

/* --- SUCHE & FILTER --- */
#tm-widget .control-panel { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 15px; 
    padding-bottom: 15px; 
    border-bottom: 2px solid #f8f8f8; 
}

#tm-widget .search-section { flex: 0 0 40%; display: flex; gap: 10px; }

#tm-widget input[type="text"] { 
    flex-grow: 1; 
    padding: 10px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 15px; 
    background: #f8f8f8; 
}
#tm-widget input[type="text"]:focus {
    background: #fff;
    border-color: #8cc63f; 
    outline: none;
}

/* HAUPT BUTTON (Suchen) - GRÜN */
#tm-widget .search-btn { 
    padding: 0 25px; 
    background: #8cc63f; /* Tulex Grün */
    color: white; 
    border: none; 
    border-radius: 4px; 
    font-size: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    white-space: nowrap; 
    display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 4px 6px rgba(140, 198, 63, 0.3);
    transition: background 0.3s;
}
#tm-widget .search-btn:hover { 
    background: #7ab32e; 
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(140, 198, 63, 0.4);
}

/* Spinner im Button */
.spinner { border-color: #ffffff; border-top-color: transparent; }

#tm-widget .filter-section { flex-grow: 1; display: flex; gap: 25px; align-items: center; justify-content: flex-start; }
#tm-widget .filter-group-title { font-size: 11px; text-transform: uppercase; color: #888; margin-bottom: 4px; font-weight: 600; letter-spacing: 0.5px; }

/* CHECKBOXEN */
#tm-widget .checkbox-group { display: flex; gap: 12px; font-size: 13px; align-items: center; }
#tm-widget .checkbox-group label { cursor: pointer; display: flex; align-items: center; gap: 4px; }
#tm-widget input[type="checkbox"]:checked, 
#tm-widget input[type="radio"]:checked {
    accent-color: #8cc63f; 
}

/* --- Klassen Chips --- */
#tm-widget .classes-container { margin-bottom: 15px; }
#tm-widget .class-list { display: flex; flex-wrap: wrap; gap: 6px; }

#tm-widget .class-chip { 
    font-size: 11px; 
    padding: 4px 10px; 
    border-radius: 12px; 
    border: 1px solid #eee; 
    background: #f8f8f8; 
    color: #666;
    cursor: pointer; 
    transition: 0.2s; 
    user-select: none; 
}
#tm-widget .class-chip:hover { background: #e9ecef; color: #333; }
#tm-widget .class-chip.active { 
    background: #8cc63f; 
    color: white; 
    border-color: #8cc63f; 
}

/* --- Statistik --- */
#tm-widget .stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 15px; }
#tm-widget .stat-box { background: #f8f8f8; padding: 10px; border-radius: 4px; text-align: center; border: 1px solid #eee; }
#tm-widget .stat-value { font-size: 18px; font-weight: bold; display: block; margin-bottom: 2px; color: #32373c; }
#tm-widget .stat-label { font-size: 9px; color: #777; text-transform: uppercase; }

#tm-widget .risk-vhigh { color: #ff0000; } 
#tm-widget .risk-high { color: #dc3545; }
#tm-widget .risk-med { color: #eebb00; }

/* ============================================================
   LISTE / TABELLE
   ============================================================ */
#tm-widget .content-split { position: relative; display: block; border-top: 1px solid #f8f8f8; padding-top: 15px; }
#tm-widget .list-column { width: 100%; min-width: 100%; }
#tm-widget table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }

#tm-widget th { 
    text-align: left; 
    padding: 12px 10px; 
    border-bottom: 2px solid #8cc63f; 
    color: #32373c; 
    font-weight: 700; 
    font-size: 11px; 
    text-transform: uppercase; 
}

#tm-widget td { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; vertical-align: middle; color: #555; }
#tm-widget tr:hover { background-color: #f8f8f8; }

#tm-widget tr.selected-row { 
    background-color: #f0f7e6; 
    border-left: 3px solid #8cc63f; 
}

#tm-widget .inactive-row { color: #aaa; background-color: #fcfcfc; }
#tm-widget .inactive-badge { font-size: 9px; background: #eee; color: #666; padding: 2px 5px; border-radius: 4px; margin-left: 5px; }

/* PAGINATION */
#tm-widget .pagination-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #eee; margin-top: 15px; }
#tm-widget .page-btn { 
    padding: 6px 16px; 
    border: 1px solid #ddd; 
    background: white; 
    cursor: pointer; 
    border-radius: 4px; 
    font-size: 13px; 
    font-weight: 600; 
    color: #32373c; 
}
#tm-widget .page-btn:hover { background: #32373c; color: white; }
#tm-widget .page-btn:disabled { opacity: 0.5; cursor: default; background: #fff; color: #ccc; }

/* ============================================================
   DETAIL PANEL
   ============================================================ */
#tm-widget .details-column {
    display: none; /* wird per JS auf flex gesetzt */
    flex-direction: column; /* Wichtig für Sticky Header */
    width: 500px; max-width: 90%; 
    background: #ffffff; border: 1px solid #ddd; border-radius: 6px; 
    
    /* Positionierung */
    position: absolute; right: 0; top: 20px; z-index: 1000;
    
    /* Höhe & Verhalten */
    max-height: calc(100vh - 40px); /* Nutzt den Bildschirm aus */
    overflow: hidden; /* Der Container selbst scrollt NICHT */
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    padding: 0; /* Padding weg vom Container, hin zum Inhalt */
}

/* Der Schließen-Button */
#tm-widget .close-details-btn { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    font-size: 28px; 
    color: #999; 
    cursor: pointer; 
    z-index: 1001; /* Über dem Inhalt */
    line-height: 1; 
    background: rgba(255,255,255,0.9);
    width: 30px; height: 30px; 
    text-align: center; border-radius: 50%;
}
#tm-widget .close-details-btn:hover { color: #ff0000; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* Der Inhalt (Dieser Teil scrollt) */
#tm-widget #detailContent {
    flex: 1;
    overflow-y: auto; 
    padding: 20px;
    padding-top: 40px; 
}

/* 5PX SCROLLBAR */
#tm-widget #detailContent::-webkit-scrollbar { width: 5px; }
#tm-widget #detailContent::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
#tm-widget #detailContent::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
#tm-widget #detailContent::-webkit-scrollbar-thumb:hover { background: #8cc63f; }

/* HEADER */
#tm-widget .detail-header { 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
    display: flex; gap: 15px; align-items: flex-start; padding-right: 20px; 
}
#tm-widget .detail-logo { max-height: 60px; max-width: 80px; border: 1px solid #eee; padding: 2px; background: #fff; flex-shrink: 0;}
#tm-widget .header-content { flex-grow: 1; }
#tm-widget .header-top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;}
#tm-widget h2 { color: #32373c; }

/* ============================================================
   STATUS BADGES & AMT (FIXED LAYOUT)
   ============================================================ */

/* 1. CONTAINER: Legt Status und Amt nebeneinander */
#tm-widget .status-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; /* Schiebt alles nach rechts */
}

/* 2. AMT-BADGE (Mit Rahmen) */
#tm-widget .office-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ddd;
    background: #ffffff;
    padding: 0 10px;
    height: 30px;
    border-radius: 4px;
    color: #333;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

#tm-widget .office-badge img {
    height: 14px;
    width: auto;
    display: block;
	transform: translateY(8px);
}

/* 3. STATUS-BADGE (Grün) */
#tm-widget .status-badge {
    display: inline-flex;       /* Flex für vertikale Zentrierung */
    align-items: center;        /* Text vertikal mittig */
    height: 30px;               /* Selbe Höhe wie Amt */
    padding: 0 10px;
    border-radius: 3px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
}

/* Farben */
#tm-widget .status-registered,
#tm-widget .status-active { background-color: #28a745 !important; } 
#tm-widget .status-inactive { background-color: #dc3545 !important; } 

/* ============================================================ */

/* GRID */
#tm-widget .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 40px; font-size: 13px; margin-bottom: 20px;}
#tm-widget .detail-item { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px dotted #eee; padding-bottom: 4px;}
#tm-widget .detail-item label { font-size: 10px; color: #888; text-transform: uppercase; margin: 0; padding-right: 5px; text-align: left; flex: 0 0 auto; }
#tm-widget .detail-item span { font-weight: 600; text-align: right; color: #32373c; word-break: break-word; flex: 1; }

/* SEKTIONEN */
#tm-widget .section-title { font-size: 14px; font-weight: 600; color: #8cc63f; border-bottom: 2px solid #f8f8f8; margin: 20px 0 10px 0; padding-bottom: 4px; }
#tm-widget .gs-list { max-height: 200px; overflow-y: auto; background: #f8f8f8; border: 1px solid #eee; padding: 8px; border-radius: 4px; font-size: 12px; line-height: 1.4; }
#tm-widget .gs-class { color: #8cc63f; font-weight: bold; }

/* Warenverzeichnis Scrollbar */
#tm-widget .gs-list::-webkit-scrollbar { width: 5px; }
#tm-widget .gs-list::-webkit-scrollbar-track { background: #f1f1f1; }
#tm-widget .gs-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* ZERO STATE & DISCLAIMER */
.zero-result-box { text-align: center; padding: 40px 20px; background: #fdfdfe; border: 1px dashed #8cc63f; border-radius: 8px; margin-top: 20px; color: #444; }
.zero-result-icon { font-size: 40px; margin-bottom: 15px; display: block; }
.zero-result-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: #32373c; }
.zero-result-text { font-size: 14px; line-height: 1.6; max-width: 600px; margin: 0 auto 25px auto; color: #666; }
.zero-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.legal-disclaimer-bar { background-color: #fff3cd; border: 1px solid #ffeeba; color: #856404; padding: 10px 15px; border-radius: 4px; font-size: 12px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.legal-icon { font-size: 16px; }

/* SIDEBAR UPSELL */
.detail-upsell-box { margin-top: 30px; padding: 20px; background: #f8f8f8; border-left: 4px solid #8cc63f; border-radius: 4px; }
.upsell-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #32373c; }
.upsell-text { font-size: 12px; line-height: 1.5; color: #555; margin-bottom: 15px; }

.btn-full-width { width: 100%; text-align: center; display: block; background: #32373c; color: white; border: none; padding: 10px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.btn-full-width:hover { background: #8cc63f; }

/* LIST END UPSELL */
tr.upsell-row { background-color: #f8f8f8 !important; border-top: 2px solid #eee; border-bottom: 2px solid #eee; cursor: default !important; }
tr.upsell-row:hover { background-color: #f0f0f0 !important; }
.upsell-cell { padding: 8px 15px !important; vertical-align: middle !important; }
.upsell-flex-container { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 15px; }
.upsell-content-left { display: flex; align-items: center; gap: 15px; text-align: left; }
.upsell-text-block { font-size: 13px; color: #32373c; line-height: 1.2; }
.upsell-buttons-right { display: flex; gap: 10px; align-items: center; }

/* BUTTONS */
.upsell-btn-small, .btn-outline { background: #32373c; color: white; border: 1px solid #32373c; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: 0.2s; }
.upsell-btn-small:hover { background: #8cc63f; border-color: #8cc63f; }
.upsell-btn-outline { background: transparent; color: #32373c; border: 1px solid #32373c; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: 0.2s; }
.upsell-btn-outline:hover, .btn-outline:hover { background: #8cc63f; color: white; border-color: #8cc63f; }

/* ANIMATIONEN */
.spinner { display: none; width: 14px; height: 14px; border: 2px solid #ffffff; border-top: 2px solid transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
button.search-btn.loading .spinner { display: inline-block; }
button.search-btn.loading span { opacity: 0.8; }
button.search-btn.loading { cursor: wait; opacity: 0.9; }

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton { background: #f0f0f0; background-image: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
.sk-row { height: 40px; margin-bottom: 8px; width: 100%; display: flex; gap: 10px; }
.sk-col { height: 100%; background: inherit; border-radius: 4px; }
.sk-detail-header { height: 60px; width: 100%; margin-bottom: 20px; }
.sk-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.sk-detail-item { height: 20px; width: 100%; }
.sk-text-block { height: 12px; margin-bottom: 8px; width: 100%; }

/* MOBILE */
@media screen and (max-width: 768px) {
    #tm-widget .widget-container { padding: 10px; margin: 0; border-radius: 0; box-shadow: none; border: none; }
    #tm-widget .control-panel { flex-direction: column; align-items: stretch; gap: 15px; }
    #tm-widget .search-section { flex: 1 1 auto; width: 100%; }
    #tm-widget .filter-section { flex-wrap: wrap; gap: 15px; justify-content: space-between; }
    #tm-widget input[type="text"] { font-size: 16px; }
    #tm-widget th:nth-child(3), #tm-widget td:nth-child(3), 
    #tm-widget th:nth-child(4), #tm-widget td:nth-child(4),
    #tm-widget th:nth-child(5), #tm-widget td:nth-child(5), 
    #tm-widget th:nth-child(6), #tm-widget td:nth-child(6) { display: none; }
    #tm-widget table { font-size: 14px; }
    #tm-widget td, #tm-widget th { padding: 12px 5px; }
    #tm-widget .details-column {
        width: 100%; height: 100%; max-width: 100%; max-height: 100vh;
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        border-radius: 0; z-index: 9999; margin: 0; border: none;
        display: none; animation: slideInUp 0.3s ease-out;
        flex-direction: column;
    }
    #tm-widget .close-details-btn {
        top: 15px; right: 20px; font-size: 32px;
        background: #f8f8f8; width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 50%; color: #32373c;
    }
    #tm-widget .detail-grid { grid-template-columns: 1fr; gap: 15px; }
    #tm-widget .detail-header { flex-direction: column; align-items: center; text-align: center; }
    #tm-widget .header-top-row { flex-direction: column; align-items: center; width: 100%; }
    #tm-widget .detail-item { border-bottom: 1px solid #eee; padding: 8px 0; }
    .upsell-flex-container { flex-direction: column; text-align: center; gap: 15px; }
    .upsell-content-left { flex-direction: column; text-align: center; }
    .upsell-buttons-right { flex-direction: column; width: 100%; }
    .upsell-btn-small, .upsell-btn-outline { width: 100%; padding: 12px; font-size: 14px; display: block; text-align: center; }
    .upsell-cell { padding: 20px 10px !important; }
    #tm-widget .stats-bar, .legal-disclaimer-bar { display: none !important; }
}

@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }


/* --- FEHLER SEKTION STYLING --- */

#marken-guide-page .fehler-container {
    margin-top: 2.5rem;
}

#marken-guide-page .fehler-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

#marken-guide-page .check-box {
    margin-top: 0.25rem;
    color: hsl(var(--border)); /* Dezentes Grau für die leere Box */
    flex-shrink: 0;
}

#marken-guide-page .check-box i {
    width: 24px;
    height: 24px;
    stroke-width: 1.5px;
}

#marken-guide-page .fehler-content h3 {
    margin: 0 0 0.75rem 0 !important;
    font-size: 1.25rem !important;
    font-family: 'Source Serif 4', serif;
    color: hsl(var(--primary));
}

#marken-guide-page .fehler-content p {
    margin: 0;
    font-size: 1rem;
    color: hsla(var(--foreground), 0.85);
    line-height: 1.6;
}

/* Mobile Anpassung für die Fehler-Items */
@media (max-width: 768px) {
    #marken-guide-page .fehler-item {
        gap: 1rem;
    }
    
    #marken-guide-page .check-box i {
        width: 20px;
        height: 20px;
    }
}

/* --- MODERN CHECKLIST DESIGN --- */
#marken-guide-page .modern-checklist {
    display: grid;
    gap: 1rem;
    margin: 2.5rem 0;
}

#marken-guide-page .check-card {
    background: #ffffff;
    border: 1px solid #E6EBF2;
    border-left: 4px solid #E6EBF2; /* Inaktiver Status */
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

#marken-guide-page .check-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left-color: #cbd5e1;
}

/* Aktiver / Abgehakter Status */
#marken-guide-page .check-card.checked {
    border-left-color: #8cc63f;
    background-color: rgba(140, 198, 63, 0.04);
}

#marken-guide-page .check-box-wrapper {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 2px solid #E6EBF2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    margin-top: 2px;
}

#marken-guide-page .check-card.checked .check-box-wrapper {
    background: #8cc63f;
    border-color: #8cc63f;
    animation: pulse-check 0.4s ease;
}

#marken-guide-page .check-box-wrapper i {
    color: transparent;
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

#marken-guide-page .check-card.checked .check-box-wrapper i {
    color: #ffffff;
}

#marken-guide-page .check-info h3 {
    margin: 0 0 0.25rem 0 !important;
    font-size: 1.1rem !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #0B2D45;
}

#marken-guide-page .check-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #5B6678;
    line-height: 1.5;
}

/* Plopp-Animation für den Haken */
@keyframes pulse-check {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}