@mixin matcha-chip-theme($theme) {
    $foreground: map-get($theme, foreground);
    $background: map-get($theme, background);

    // --------------------------------------------------------
    // Host element — pill, 40px height, 2px border
    // --------------------------------------------------------
    matcha-chip {
        display: inline-flex;
        align-items: center;
        height: px-to-rem(40px);
        min-height: px-to-rem(40px);
        padding: 0 px-to-rem(16px);

        &.matcha-chip-removable {
            padding: 0 px-to-rem(8px) 0 px-to-rem(16px);
        }
        gap: px-to-rem(8px);
        box-sizing: border-box;

        border-radius: $border-radius-wider;
        border: $border-width-thin $border-style-solid map-get($foreground, placeholder);

        font-size: $size-font-small;
        font-weight: $size-font-weight-medium;
        color: map-get($foreground, label);

        white-space: nowrap;
        overflow: hidden;
        user-select: none;
        cursor: default;
        outline: none;

        transition:
            border-color 150ms ease,
            background-color 150ms ease;

        &.matcha-chip-selectable:not(.matcha-chip-disabled) {
            cursor: pointer;
        }

        &:not(.matcha-chip-disabled):hover {
            border-color: map-get($foreground, base);
        }

        &.matcha-chip-selected {
            border-color: getPrimary($theme);
            background-color: getPrimaryAlpha($theme);
            color: getPrimary($theme);
        }

        &.matcha-chip-selected:not(.matcha-chip-disabled):hover {
            border-color: getPrimary($theme);
        }

        &.matcha-chip-disabled {
            opacity: 0.4;
            pointer-events: none;
            cursor: default;
        }
    }

    // --------------------------------------------------------
    // Content area (projected ng-content)
    // --------------------------------------------------------
    .matcha-chip-content {
        display: inline-flex;
        align-items: center;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }

    // --------------------------------------------------------
    // Remove button — after the vertical divider
    // --------------------------------------------------------
    .matcha-chip-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: px-to-rem(20px);
        height: px-to-rem(20px);
        min-width: px-to-rem(20px);
        padding: 0;
        margin: 0;
        border: none;
        border-radius: $border-radius-wider;
        background: transparent;
        color: inherit;
        cursor: pointer;
        outline: none;
        transition: background-color 150ms ease;

        &:hover {
            background-color: map-get($foreground, divider);
        }

        &:focus-visible {
            background-color: map-get($foreground, divider);
        }

        &[disabled] {
            cursor: default;
            opacity: 0.4;
            pointer-events: none;
        }
    }

    // --------------------------------------------------------
    // Chip list wrapper
    // --------------------------------------------------------
    .matcha-chip-list-wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: px-to-rem(8px);

        &.matcha-chip-list-vertical {
            flex-direction: column;
            align-items: flex-start;
        }
    }

    .matcha-chip-list-disabled {
        opacity: 0.6;
        pointer-events: none;
    }
}
