/*
 * tags-all.css — страница /tag/all: облако тэгов пилюлями с счётчиком книг.
 * Визуальный язык согласован с чипсами тэгов на главной (home-chips):
 * светло-серые пилюли, border-radius 18px. Поддержка тёмной темы
 * (body.dark-theme + CSS-переменные из dark-theme.css).
 */
.tags-all {
    max-width: 1000px;
}

.tags-all__count {
    color: #8a939b;
    font-weight: 400;
    font-size: 0.55em;
    vertical-align: middle;
}

.tags-all__cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tags-all__pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px 6px 13px;
    border-radius: 18px;
    background: #f0f1f2;
    color: #2b2f33;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.tags-all__pill:hover,
.tags-all__pill:focus {
    background: #e2e5e8;
    color: #000;
    text-decoration: none;
}

.tags-all__badge {
    font-size: 12px;
    color: #8a939b;
    background: #ffffff;
    border-radius: 11px;
    padding: 1px 8px;
    min-width: 20px;
    text-align: center;
}

.tags-all__pill:hover .tags-all__badge {
    color: #5b636b;
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark-theme .tags-all__count {
    color: var(--dark-text-muted, #888888);
}

body.dark-theme .tags-all__pill {
    background: #33373b;
    color: var(--dark-text-primary, #ffffff);
}

body.dark-theme .tags-all__pill:hover,
body.dark-theme .tags-all__pill:focus {
    background: #3f4448;
    color: #ffffff;
}

body.dark-theme .tags-all__badge {
    background: var(--dark-bg-card, #2a2a2a);
    color: var(--dark-text-secondary, #b0b0b0);
}

body.dark-theme .tags-all__pill:hover .tags-all__badge {
    color: var(--dark-text-primary, #ffffff);
}

@media (max-width: 600px) {
    .tags-all__cloud {
        gap: 6px;
    }
    .tags-all__pill {
        font-size: 13px;
        padding: 5px 7px 5px 11px;
    }
}
