/* ============================================================
   icons.css — иконки тем, выбор иконки, дистрибутивы
   ============================================================ */

.topic-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex: 0 0 20px;
    color: var(--text-mute);
    margin-right: 4px;
}
.topic-icon svg { width: 18px; height: 18px; }
.topic-row:hover .topic-icon { color: var(--accent); }

/* Иконки дистрибутивов — сохраняют брендовые цвета */
.card-ico svg,
.topic-icon svg,
.icon-pick svg {
    /* цвет управляется fill/stroke внутри SVG */
}

/* ---------- Сетка выбора: уменьшено в 2 раза ---------- */
.icon-group-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin: 10px 0 5px;
}
.icon-group-title:first-child { margin-top: 0; }

.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 5px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.icon-pick {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    gap: 3px;
    padding: 6px 3px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel-soft);
    cursor: pointer; user-select: none;
    color: var(--text-dim);
    font-size: 9px; line-height: 1.1; text-align: center;
    transition: border-color .15s, background-color .15s, color .15s;
    min-height: 36px;
}
.icon-pick:hover {
    border-color: var(--accent-30);
    background: var(--accent-10);
    color: var(--text);
}
.icon-pick input[type="radio"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.icon-pick svg {
    width: 13px; height: 13px;
    flex: none;
    color: var(--text-mute);
    transition: color .15s;
}
.icon-pick > span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.icon-pick.selected,
.icon-pick:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-10);
    color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-20);
}
.icon-pick.selected svg,
.icon-pick:has(input:checked) svg { color: var(--accent); }

/* На мобильных — 4 колонки фиксированно */
@media (max-width: 640px) {
    .icon-picker { grid-template-columns: repeat(4, 1fr); }
}