@import 'variables';

:host {
    display: inline-block;
    overflow: hidden;
}

.wrapper {
    display: flex;
    vertical-align: baseline;
    font-size: var(--font-size-xs);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    line-height: 12px;
    text-align: center;
    color: var(--color-weight-700);
    border: 1px solid var(--color-weight-125);

    &.with-background {
        color: var(--color-grey-100);
        border-color: transparent;

        .chip-label {
            opacity: 0.9;
        }
    }

    &.warning {
        border-color: var(--color-chip-warning-border);

        color: var(--color-chip-warning-text);
        background-color: var(--color-chip-warning-bg);
    }

    &.success {
        border-color: var(--color-chip-success-border);

        color: var(--color-chip-success-text);
        background-color: var(--color-chip-success-bg);
    }

    &.error {
        border-color: var(--color-chip-error-border);

        color: var(--color-chip-error-text);
        background-color: var(--color-chip-error-bg);
    }
}

.chip-label {
    padding: 5px 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

.chip-icon {
    border-inline-start: 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;
    }
}
