/*
 * Admin Sponsors list (/admin/conference/{tenant}/sponsors): the dotted Type
 * pills, the sponsor count beside the heading, and the table toolbar
 * (search, sponsor type filter, rows shown). Registered in AppServiceProvider;
 * the tracked copy in public/css/app/admin-sponsors.css is kept byte-identical
 * with `cp` (`php artisan filament:assets` republishes it on every Vapor build).
 *
 * Unlayered, so these rules win over Filament's layered component CSS.
 */

/*
 * Type pills: Filament's default badge geometry rather than the smaller
 * fi-size-sm a TextColumn badge gets, no ring, and a leading dot in the text
 * colour. The cell carries asca-sponsor-type-cell because Filament's own cell
 * class for sponsorType.name contains a dot.
 */
.asca-sponsor-type-cell .fi-badge {
    padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
    column-gap: 0.375rem;
    letter-spacing: normal;
    box-shadow: none;
}

.asca-sponsor-type-cell .fi-badge::before {
    content: '';
    flex: none;
    width: 0.3125rem;
    height: 0.3125rem;
    border-radius: 9999px;
    background-color: currentColor;
}

.dark .asca-sponsor-type-cell .fi-badge {
    color: var(--color-300);
    background-color: color-mix(in oklab, var(--color-400) 15%, transparent);
}

/* Sponsor count pill after the "Sponsors" heading (ListSponsors::getHeading). */
.asca-heading-count {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-inline-start: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    font-weight: 500;
    background-color: var(--gray-100);
    color: var(--gray-600);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

.dark .asca-heading-count {
    background-color: color-mix(in oklab, var(--gray-800) 70%, transparent);
    color: var(--gray-300);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, white 10%, transparent);
}

/*
 * Toolbar: search and the type filter side by side at the start, the rows
 * shown count at the end. The div holding the search field is the toolbar's
 * second child, which Filament pushes right with an auto inline-start margin.
 */
.fi-resource-sponsors .fi-ta-header-toolbar > div:has(> .asca-sponsors-type-filter) {
    order: -1;
    margin-inline-start: 0;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 100%;
}

.fi-resource-sponsors .fi-ta-search-field {
    width: 16rem;
    max-width: 100%;
}

.asca-sponsors-type-filter {
    width: 13rem;
    max-width: 100%;
}

.asca-sponsors-shown {
    margin-inline-start: auto;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--gray-500);
    white-space: nowrap;
}

.dark .asca-sponsors-shown {
    color: var(--gray-400);
}
