/* Attribute curation table: fixed layout so column widths never reflow when
   cell content varies in length. Single-line cells with ellipsis on overflow. */
.attr-table {
    table-layout: fixed;
}

.attr-table th,
.attr-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tags inside cells must shrink with the cell rather than push it wider. */
.attr-table .tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category tree: collapsible nested list with its own scroll container so the
   right-hand product/facet pane scrolls independently of the sidebar. */
.category-tree {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.cat-tree-root,
.cat-children {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.cat-children {
    display: none;
    margin-left: 0.75em;
    padding-left: 0.75em;
    border-left: 1px solid #dbdbdb;
}

.cat-node.is-expanded > .cat-children {
    display: block;
}

.cat-node-row {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
}

.cat-toggle,
.cat-toggle-spacer {
    flex: 0 0 1.25rem;
    width: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cat-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #7a7a7a;
}

.cat-toggle:hover {
    color: #363636;
}

.cat-toggle-icon::before {
    content: "\25B6"; /* ▶ */
    font-size: 0.65rem;
    display: inline-block;
    transition: transform 0.12s ease;
}

.cat-node.is-expanded > .cat-node-row > .cat-toggle .cat-toggle-icon::before {
    transform: rotate(90deg);
}

.cat-link {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    padding: 0.25em 0.5em;
    border-radius: 2px;
    color: #4a4a4a;
    text-decoration: none;
    word-break: break-word;
}

.cat-link:hover {
    background-color: whitesmoke;
    color: #363636;
}

.cat-link.is-active {
    background-color: hsl(229, 53%, 53%);
    color: #fff;
}
