﻿.output-tags {
    font-size: .8rem;
    line-height: 1.2rem;
    margin-bottom: .5rem;
    min-height: 26px;
    text-align: left;
}

.output-tags .tag {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 3px;
    background-color: var(--highlight);
    color: #fff;
    margin-bottom: .25rem;
    min-height: 26px;
    vertical-align: top;
    min-width: 23px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tag-group{
    position: relative;
    user-select: none;
    cursor: pointer;
    background-color: #aaa;
}

.tag-group:focus-within{
    background-color: #dfdfdf;
    border: 1px solid var(--highlight);
    color: var(--highlight);
}

.tag-list {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    margin-top: 8px;
    z-index: 1;
    background-color: #dfdfdf;
    border: 1px solid #bbb;
    border-radius: 10px;
    padding: .5rem .5rem;
    display: flex;
    flex-direction: column;
    column-gap: .3rem;
    row-gap: .3rem;
    justify-content: space-between;
    justify-content: center;
    text-align: center;
    display: none;
}

    .tag-list::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 50%;
        margin-left: -8px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 10px solid #bbb;
        z-index: 5;
    }

.tag-list .tag{
    margin-bottom: 0;
}

.tag-group:hover .tag-list,
.tag-group:focus-within .tag-list {
    display: flex;
}

@media (max-width: 768px) {
    .output-tags {
        font-size: .75rem;
    }

        .output-tags .tag {
            padding: .1rem .5rem;
            min-height: 20px;
        }
}