/* ====================== ТЕГИ ====================== */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    min-height: 48px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #1976d2;
    color: white;
    border-radius: 9999px;
    font-size: 0.9em;
    margin: 2px;
    cursor: default;
}

.tag-chip:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.tag-chip .delete {
    margin-left: 6px;
    font-weight: bold;
    cursor: pointer;
}

.tag-chip .delete:hover {
    color: #e74c3c;
}

.tag-input-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tag-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
}

.tag-input-row button {
    padding: 0 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.tag-input-row button:hover {
    background: #219653;
}

/* В дереве — маленькие бейджи */
.node-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 0.75em;
}

.node-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 1px 6px;
    border-radius: 9999px;
    line-height: 1;
    white-space: nowrap;
}

/* Для популярных тегов */
#popularTagsList .tag-chip {
    transition: all 0.2s;
}

#popularTagsList .tag-chip:hover {
    transform: scale(1.05);
}

/* ====================== ПОИСКОВАЯ ПАНЕЛЬ ====================== */

#searchPanel {
    background: #f8f9fa;
    border-bottom: 3px solid #3498db;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

body.theme-dark #searchPanel {
    background: #1e2937;
    border-bottom-color: #60a5fa;
}

#searchInput {
    transition: all 0.2s;
}

#searchInput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Выбранные теги в поисковой панели */
#selectedTagsContainer .tag-chip {
    background: #2563eb;
    color: white;
    font-size: 0.9em;
    padding: 4px 12px;
    border-radius: 9999px;
}

/* Подсказка */
#searchHint {
    font-size: 0.85em;
    color: #64748b;
}

body.theme-dark #searchHint {
    color: #94a3b8;
}