/*
 * Filament 4.13 stopped drawing the select's remove buttons with an inline SVG
 * and paints the "x" with CSS instead. The published JavaScript is 4.13, so
 * whenever the stylesheet serving a panel was compiled from an older Filament
 * the buttons are still there and still clickable, but have nothing to draw:
 * selected badges in a multi-select show no "x", and a single select cannot be
 * cleared.
 *
 * These are Filament 4.13's own declarations. Once the panel theme is rebuilt
 * against 4.13 or later they duplicate rules it already has, and this file can
 * go. Deliberately not wrapped in @layer: this sheet loads before the theme,
 * and naming a layer here first would reorder Tailwind's layers for the whole
 * page.
 */

/* The "x" on each badge of a multi-select. */
.fi-badge .fi-badge-delete-btn-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z' /%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z' /%3E%3C/svg%3E");
    -webkit-mask-position: 50%;
    mask-position: 50%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/*
 * Its colour. Set on the button, not the icon, so a current theme's own icon
 * colours (including hover) still win; the icon only inherits these when the
 * theme has none.
 */
.fi-badge .fi-badge-delete-btn {
    color: color-mix(in oklab, var(--gray-700) 50%, transparent);
}

.fi-badge .fi-badge-delete-btn:where(.dark, .dark *) {
    color: color-mix(in oklab, var(--gray-300) 50%, transparent);
}

.fi-badge.fi-color .fi-badge-delete-btn {
    color: color-mix(in oklab, var(--color-700) 50%, transparent);
}

.fi-badge.fi-color .fi-badge-delete-btn:where(.dark, .dark *) {
    color: color-mix(in oklab, var(--color-300) 50%, transparent);
}

/* The "x" that clears a single select. Its colour is already styled. */
.fi-select-input .fi-select-input-value-remove-btn {
    position: absolute;
    top: 50%;
    inset-inline-end: 2rem;
    width: 1rem;
    height: 1rem;
    translate: 0 -50%;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z' /%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z' /%3E%3C/svg%3E");
    -webkit-mask-position: 50%;
    mask-position: 50%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Keeps the selected label from running underneath it. */
.fi-select-input .fi-select-input-ctn-clearable .fi-select-input-btn {
    padding-inline-end: 3.5rem;
}
