@import 'variables';

:host {
    display: inline-block;
}

.wrapper {
    display: flex;
    border: 1px solid var(--color-component-border-300);
    border-radius: 3px;
    margin: 6px;
    &.with-background {
        color: var(--color-grey-100);
        border-color: transparent;
        .chip-label {
            opacity: 0.9;
        }
    }

    &.warning {
        border-color: var(--color-chip-warning-border);
        .chip-label {
            color: var(--color-chip-warning-text);
            background-color: var(--color-chip-warning-bg);
        }
    }

    &.success {
        border-color: var(--color-chip-success-border);
        .chip-label {
            color: var(--color-chip-success-text);
            background-color: var(--color-chip-success-bg);
        }
    }

    &.error {
        border-color: var(--color-chip-error-border);
        .chip-label {
            color: var(--color-chip-error-text);
            background-color: var(--color-chip-error-bg);
        }
    }
}

.chip-label {
    padding: 3px 6px;
    line-height: 1em;
    border-radius: 3px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.chip-icon {
    border-left: 1px solid var(--color-component-border-200);
    padding: 0 3px;
    line-height: 1em;
    display: flex;

    button {
        cursor: pointer;
        background: none;
        margin: 0;
        padding: 0;
        border: none;
    }
}
