/*
 * smake/filament-distribution-bar — segmentierter Verteilungs-Balken.
 * Handgeschriebenes CSS ohne Build-Step (wie smake/filament-sticky-column);
 * Farben der Segmente/Punkte kommen inline vom Aufrufer, hier stehen nur
 * Layout, Rundungen und die dark-mode-fähigen Grau-Töne der Hülle.
 */
.smake-dist-bar-section header.fi-section-header {
    align-items: center;
}

.smake-dist-bar {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
}

.smake-dist-bar-cell {
    /* Die Zelle soll die verfügbare Spaltenbreite nutzen, nicht am Inhalt kleben. */
    width: 100%;
    min-width: 10rem;
    padding-block: 0.25rem;
}

.smake-dist-bar-track {
    display: flex;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background-color: var(--gray-100);
}

.dark .smake-dist-bar-track {
    background-color: var(--gray-800);
}

.smake-dist-bar-track-sm {
    height: 0.5rem;
}

.smake-dist-bar-track-md {
    height: 0.75rem;
}

.smake-dist-bar-segment {
    flex: 1 1 0%;
    height: 100%;
    border: 0;
    padding: 0;
    /* Bewusst kein Segment-Abstand: bei vielen Segmenten (bis 128 Behälter)
       bleibt der Balken so eine geschlossene Fläche. */
}

.smake-dist-bar-segment-clickable {
    cursor: pointer;
    transition: opacity 0.15s ease-in-out;
}

.smake-dist-bar-segment-clickable:hover {
    opacity: 0.7;
}

.smake-dist-bar-legend-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--gray-500);
}

.dark .smake-dist-bar-legend-inline {
    color: var(--gray-400);
}

/* Mitwachsende Spalten statt fester Vierer-Teilung: die Legende hat je nach
   Zustand vier oder fünf Einträge und soll in beiden Fällen eine Zeile
   bleiben, solange die Breite reicht. */
.smake-dist-bar-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
}

@media (min-width: 48rem) {
    .smake-dist-bar-legend-grid {
        grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    }
}

.smake-dist-bar-legend-grid dt {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.dark .smake-dist-bar-legend-grid dt {
    color: var(--gray-400);
}

.smake-dist-bar-legend-grid dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-950);
}

.dark .smake-dist-bar-legend-grid dd {
    color: var(--gray-50);
}

.smake-dist-bar-dot {
    display: inline-block;
    height: 0.5rem;
    width: 0.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
}

.smake-dist-bar-notes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.dark .smake-dist-bar-notes {
    color: var(--gray-300);
}

.smake-dist-bar-notes li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
