/* Modellbau Werkstatt — Kategorie-Baum */

.mw-cat-tree {
    font-size: 14px;
    line-height: 1.4;
}

.mw-cat-tree__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mw-cat-tree__depth-0 > .mw-cat-tree__item {
    border-bottom: 1px solid #eee;
}

.mw-cat-tree__depth-0 > .mw-cat-tree__item:last-child {
    border-bottom: none;
}

/* Verschachtelung einrücken */
.mw-cat-tree__list .mw-cat-tree__list {
    padding-left: 16px;
}

/* Zeile: Toggle + Link */
.mw-cat-tree__row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
}

/* Toggle-Button */
.mw-cat-tree__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: color 0.15s;
    border-radius: 3px;
}

.mw-cat-tree__toggle:hover {
    color: #333;
    background: #f0f0f0;
}

/* Pfeil-Icon Rotation */
.mw-cat-tree__icon {
    transition: transform 0.2s ease;
}

.mw-cat-tree__item--open > .mw-cat-tree__row > .mw-cat-tree__toggle .mw-cat-tree__icon {
    transform: rotate(90deg);
}

/* Platzhalter wenn kein Toggle */
.mw-cat-tree__spacer {
    width: 20px;
    flex-shrink: 0;
}

/* Link */
.mw-cat-tree__link {
    color: #333;
    text-decoration: none;
    transition: color 0.15s;
    flex: 1;
}

.mw-cat-tree__link:hover {
    color: #0073aa;
}

.mw-cat-tree__link--current {
    font-weight: 700;
    color: #0073aa;
}

/* Anzahl */
.mw-cat-tree__count {
    color: #999;
    font-size: 0.85em;
    margin-left: 4px;
}

/* Kinder standardmäßig versteckt */
.mw-cat-tree__item--has-children > .mw-cat-tree__list {
    display: none;
}

/* Offen = sichtbar */
.mw-cat-tree__item--open > .mw-cat-tree__list {
    display: block;
}

/* Hauptkategorien etwas prominenter */
.mw-cat-tree__depth-0 > .mw-cat-tree__item > .mw-cat-tree__row > .mw-cat-tree__link {
    font-weight: 600;
    font-size: 15px;
}
