/**
 * 空间速达企业目录两行展示：上行企业名，下行彩色标签（不滚动）。
 * 兼容面板左右镜像：
 * - 左侧（.left-side）：从左到右排布，超出裁右侧
 * - 右侧：从右到左排布（DOM 首标签靠右），超出裁左侧
 * 搜索命中 / 高权重标签始终在「起始侧」优先露出。
 *
 * 注意：右侧面板的 .collection-list-content-scroll 使用 direction:rtl（滚动条在左），
 * 企业名区块必须 direction:ltr 隔离，否则 flex-end/flex-start 会与预期左右颠倒：
 * 单标签靠左、多标签靠右、二级目录名与标签对齐不一致。
 */

.collection-name.collection-name--enterprise {
    /* 隔离父级 scroll 的 rtl，保证下方 flex 对齐按物理左右生效 */
    direction: ltr;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    white-space: normal;
    overflow: visible;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    line-height: 1.2;
}

.collection-list-container.left-side .collection-name.collection-name--enterprise {
    align-items: flex-start;
}

.collection-name--enterprise .collection-name-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.collection-list-container.left-side .collection-name--enterprise .collection-name-main {
    justify-content: flex-start;
}

.collection-name--enterprise .collection-name-text {
    font-size: 15px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

.collection-tag-row {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* 右侧镜像：整行靠右；左侧靠左 */
.collection-list-container:not(.left-side) .collection-tag-row {
    justify-content: flex-end;
}

.collection-list-container.left-side .collection-tag-row {
    justify-content: flex-start;
}

.collection-tag-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    overflow: hidden;
}

/* 左侧：LTR，起始在左 */
.collection-list-container.left-side .collection-tag-scroll {
    direction: ltr;
    justify-content: flex-start;
}

/* 右侧：RTL，起始在右（首标签靠右优先可见） */
.collection-list-container:not(.left-side) .collection-tag-scroll {
    direction: rtl;
    justify-content: flex-start;
}

/* 胶囊内文字始终正常书写方向 */
.collection-tag-chip {
    flex: 0 0 auto;
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    padding: 1px 6px;
    border-radius: 10px;
    color: rgba(233, 233, 233, 0.75);
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.collection-header {
    overflow: visible;
}
