/* Tag.css - 标签样式模块 */

.tag-section {
    padding: 15px 0;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 标签横向滑动容器 */
.tag-list-scroll {
    width: 100%;
    overflow-x: auto;
    display: flex;
    gap: 10px;
    padding: 2px 5px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    -webkit-overflow-scrolling: touch;
}

.tag-list-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* 单个标签项 */
.tag-item {
    flex: 0 0 auto;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.tag-item.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 已选标签展示区 */
.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 5px;
    min-height: 0;
    transition: all 0.3s ease;
}

.selected-tags-container:empty {
    margin: 0;
}

.selected-tag-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 5px 4px 5px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

.selected-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.selected-tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.selected-tag-clear-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.selected-tag-clear-all:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}