
@import "variables";
@import "mixins";


// -
// Modal
// ---

// @deprecated
.tags-list {
    list-style-type: none;
    margin: 0;
    padding: 0;

    .tag-item {
        display: flex;
        justify-content: stretch;
        border: 1px solid $gray-light;
        margin-bottom: 10px;
        border-radius: $border-radius;
    }

    .tag-color {
        display: block;
        width: 40px;
        flex-shrink: 0;
    }

    .tag-meta {
        padding: 5px 10px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .tag-description {
        width: 100%;
        margin-top: 5px;
        margin-bottom: 0;
        font-size: small;
        color: var(--#{$prefix}secondary-color);
        font-style: italic;
    }

    .tag-action {
        margin-left: auto;
    }
}

// @deprecated
.tag-typehead {
    margin-bottom: $component-margin-bottom;

    .tags-dropdown-menu {
        position: inherit;
        display: flex;
        flex-direction: column;
        width: 100%;
        border-radius: 3px;
        padding-top: 0;
        padding-bottom: 0;

        .tags-fetching {
            background-color: #DEE1E8;
        }
    }
}


// -
// Data Input
// ---

.tags-control {
    width: 100%;

    .form-control {
        display: flex;
        flex-wrap: wrap;
        padding: ($padding-base-vertical - 2px) ($padding-base-horizontal - 2px);

        .tag,
        input[type=text] {
            margin: 2px;
        }

        input[type=text] {
            flex: 1;
            border: none;
            padding: 0;
            line-height: $line-height-base;

            &:focus {
                border: none;
                outline: 0;
            }
        }
    }

    .tag {
        .btn-link {
            border: none;
            padding: 0;
            color: $badge-color;
            margin-left: map-get($spacers, 2);
        }
    }

    .dropdown-menu {
        padding: $dropdown-padding-y;

        .btn {
            margin-top: $dropdown-padding-y;
        }
    }

    // menu
    .tags {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        list-style: none;
        padding: 0;
        margin: -5px;

        > li {
            flex: 1 1 25%;
            max-width: 25%;
            padding: 5px;
        }
    }

    .tag-preview {
        height: 100%;
        display: block;
        text-align: left;
        border-radius: $border-radius-sm;
        padding: map-get($spacers, 2);

        .tag-description {
            text-align: justify;
            font-size: $font-size-sm;
        }

        &:focus,
        &:hover {
            background: var(--#{$prefix}tertiary-bg);
        }
    }
}

.tag-cell,
.tags {
    .tag + .tag {
        margin-left: 5px;
    }
}
