.checklist {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    legend {
        margin-bottom: 6px;
        padding: 0;
        font-size: 13px;
        font-weight: 600;
        color: $primary_color;
    }
    .options {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 4px 8px;
        max-height: 240px;
        padding: 8px;
        overflow-y: auto;
        border: 1px solid #e2e4e9;
        border-radius: 9px;
    }
    label {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 !important;
        padding: 7px 8px;
        border-radius: 7px;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.35;
        color: #3c434a;
        cursor: pointer;
        transition: 0.15s ease background-color, 0.15s ease color;
        &:hover {
            background-color: #f3f4f6;
        }
        &:has(input:checked) {
            background-color: rgba($secondary_color, 0.08);
            color: $primary_color;
        }
    }
    // Replaces WP admin's checkbox, including its ::before check mark.
    input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin: 0;
        padding: 0;
        border: 1.5px solid #c3c7ce;
        border-radius: 5px;
        background: $white_color center / 12px 12px no-repeat;
        box-shadow: none;
        outline: none;
        cursor: pointer;
        transition: 0.15s ease background-color, 0.15s ease border-color, 0.15s ease box-shadow;
        &::before {
            content: none !important;
        }
        &:hover {
            border-color: $secondary_color;
        }
        &:focus-visible {
            box-shadow: 0 0 0 3px rgba($secondary_color, 0.25);
        }
        &:checked {
            border-color: $secondary_color;
            background-color: $secondary_color;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
        }
    }
}
