/* Community tags on STL detail and browse cards */

.stl-detail-tags {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 20px;
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 12px;
}

.stl-detail-tags-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 1rem;
}

.stl-detail-tags-header i {
    color: #dc3545;
    width: 20px;
}

.stl-detail-tags-header strong {
    color: #fff;
}

.stl-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.stl-tags-list:empty::before {
    content: 'No tags yet';
    color: #888;
    font-size: 0.95rem;
    font-style: italic;
}

.stl-tag-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: 999px;
    color: #f5c2c7;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: background 0.2s, border-color 0.2s;
}

.stl-tag-chip:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.55);
}

.stl-tag-chip-label {
    cursor: pointer;
}

.stl-tag-chip-score {
    font-size: 0.8rem;
    color: #aaa;
    min-width: 1ch;
}

.stl-tag-chip-votes {
    display: none;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.stl-tag-chip:hover .stl-tag-chip-score {
    display: none;
}

.stl-tag-chip:hover .stl-tag-chip-votes {
    display: inline-flex;
}

.stl-tag-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.stl-tag-vote-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.stl-tag-vote-btn.is-active-up {
    color: #28a745;
}

.stl-tag-vote-btn.is-active-down {
    color: #dc3545;
}

.stl-tag-chip--admin .stl-tag-remove-btn {
    display: inline-flex;
}

.stl-tag-remove-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-left: 2px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.stl-tag-remove-btn:hover {
    background: rgba(220, 53, 69, 0.35);
    color: #fff;
}

.stl-tags-add-form {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.stl-tag-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
}

.stl-tag-input:focus {
    outline: none;
    border-color: #dc3545;
}

.stl-tag-add-btn {
    padding: 8px 12px;
    min-width: 40px;
}

.stl-tags-login-hint {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

.stl-tags-login-hint a {
    color: #dc3545;
}

.stl-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}

.stl-card-tags .stl-tag-chip {
    font-size: var(--text-xs);
    padding: 4px 10px;
    cursor: default;
}

.stl-card-tags .stl-tag-chip-score {
    font-size: 0.7rem;
}

.stl-card-tags .stl-tag-vote-btn {
    width: 18px;
    height: 18px;
}

.tag-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag-autocomplete-count {
    margin-left: 6px;
    color: #888;
    font-size: 0.85em;
}
